Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FormatOptions

Set of optional flags which can be passed to the format function

Hierarchy

  • FormatOptions

Index

Properties

Optional book_format

book_format: "name" | "usfm" | "osis"

The format to use for book name

  • name -> The full name -> Judges
  • usfm -> The 3 char usfm id -> JDG
  • osis -> The OSIS id -> Judg

Optional book_separator

book_separator: undefined | string

The character/string to use to separate the book name/id from the chapter/verse numbers Defaults to ' ', can use '.' and still be conformant with parser

Optional combine_ranges

combine_ranges: undefined | false | true

If true then adjacent/overlapping ranges will sorted into order and combined before printing

Optional compact

compact: undefined | false | true

If set then implict elements will be hidden, for example a range reperenting an chapter will be printed as "Genesis 1" rather than "Genesis 1:1-31", and a range representing an entire book will be printed "Genesis" rather than "Genesis 1:1 - 50:26"]

Optional complete_refs

complete_refs: undefined | false | true

If true, references will always be output in there entirety (IE: never reusing part of the previous reference as implicit context)

Eg, Rather than "Genesis 1:4,6" we will return "Genesis 1:4; Genesis 1:6"

Additionally, ranges will contain complete references on both sides of the separator character, Eg, Rather than "Genesis 1:4-6" we will return "Genesis 1:4 - Genesis 1:6"

Defaults to false, must be true to adhear to OSIS reference specification

Optional lowercase

lowercase: undefined | false | true

If true then string will be converted to lower case before being returned

Optional ref_separator

ref_separator: undefined | string

The character to use to separate multiple references if a list of distinct refs is passed in. To be conformat with the parser this should be set to a string matching the regex \s[;_]\s Defaults to '; '

Optional strip_whitespace

strip_whitespace: undefined | false | true

If set then all printer added whitespace will be stripped (IE: excludes whitespace in any custom separator options) This makes for harder to read outputs, but URL encodable output strings

Optional verse_separator

verse_separator: undefined | string

The character to use to separate the chapter number from the verse number To be conformant with the parse this should be set to one of: [ ':', 'v', '.', ' v ' ]

Generated using TypeDoc