UNPKG

@sahabaplus/mushaf-engine

Version:

TypeScript implementation of a Quran Mushaf navigation engine

30 lines (29 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LastVerseResult = void 0; /** * Information about the last verse of a page or sura encountered during navigation * * This class tracks the last verse of either a page or a sura along with * the distance of lines that were still available for navigation after reaching this verse. * Negative distance of lines indicate an overflow beyond this verse. */ class LastVerseResult { /** * Create a new LastVerseResult with specified parameters * * @param linesDistance - Distance of lines available for navigation (negative indicates overflow) * @param lastVerse - The last verse of the page or sura */ constructor(linesDistance, lastVerse) { this.linesDistance = linesDistance; this.lastVerse = lastVerse; } /** * Create a string representation of the last verse result */ toString() { return `Lines distance: ${this.linesDistance}, Verse: ${this.lastVerse}`; } } exports.LastVerseResult = LastVerseResult;