Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,16 @@
"url": "http://json.schemastore.org/tsconfig"
}
],
"cSpell.words": ["deutero", "otnt", "parseable"]
"cSpell.words": [
"bbbccc",
"bbbcccvvv",
"bbbcccvvvs",
"codecov",
"deutero",
"libpalaso",
"otnt",
"parseable",
"sillsdev",
"vref"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ v1 is a minimal partial port in TypeScript that supports use on the frontend whi

## Features

- {class} Canon - Canon information. Also, contains static information on complete list of books.
- {object} Canon - Canon information. Also, contains static information on complete list of books.
- {class} VerseRef - Stores a reference to a specific verse in Scripture.
- Represents a single reference, e.g. `'GEN 2:3'`.
- Represents a reference range, e.g. `'LUK 3:4-5'`.
Expand Down
11 changes: 9 additions & 2 deletions src/verse-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,19 @@ export class VerseRef {
return { success: true, vNum };
}

/** Not yet implemented. */
firstChapter?: number;
/** Not yet implemented. */
lastChapter?: number;
/** Not yet implemented. */
lastVerse?: number;
/** Not yet implemented. */
hasSegmentsDefined?: boolean;
/** Not yet implemented. */
text?: string;
/** Not yet implemented. */
BBBCCCVVVS?: string;
/** Not yet implemented. */
longHashCode?: number;
/** The versification of the reference. */
versification?: ScrVers;
Expand Down Expand Up @@ -577,13 +584,13 @@ export class VerseRef {
return ValidStatusType.OutOfRange;
}

// TODO: Finish the rest of the port required to uncomment the section below.
// If non-biblical book, any chapter/verse is valid
/*
if (!Canon.isCanonical(this._bookNum)) {
return ValidStatusType.Valid;
}

// TODO: Finish the rest of the port required to uncomment the section below.
/*
if (this._bookNum > this._versification.getLastBook() || this._chapterNum <= 0 ||
this._chapterNum > this._versification.getLastChapter(this._bookNum) || this.verseNum < 0 ||
this.verseNum > this._versification.getLastVerse(this._bookNum, this._chapterNum)
Expand Down