From 54482215d0dc340f2f96f6456855add2ef6987c4 Mon Sep 17 00:00:00 2001 From: Martijn Versluis Date: Tue, 26 Nov 2024 16:24:14 +0100 Subject: [PATCH] Fix readme build (#1459) --- .github/workflows/ci.yml | 2 +- .gitignore | 1 + .husky/pre-commit | 2 +- CONTRIBUTING.md | 4 +- doc/README.hbs => INTRO.md | 2 - README.md | 162681 +++++++++++++++++++++++++++++++++- jsdoc2md.json | 17 - package.json | 15 +- test/cloneable_stub.ts | 4 +- unibuild.ts | 26 +- yarn.lock | 4406 +- 11 files changed, 163492 insertions(+), 3668 deletions(-) rename doc/README.hbs => INTRO.md (99%) delete mode 100644 jsdoc2md.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a9c47da..19a6f1c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - name: Install node modules run: yarn install - name: Verify README.md - run: yarn unibuild readme && git diff --quiet README.md + run: yarn readme && git diff README.md verify-install: runs-on: ubuntu-latest strategy: diff --git a/.gitignore b/.gitignore index a0552dca..1a34c86e 100755 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ src/normalize_mappings/suffix-normalize-mapping.ts src/parser/chord/combined_grammer.pegjs src/parser/chord/suffix_grammar.pegjs src/parser/chord_pro/sections_grammar.pegjs +tmp diff --git a/.husky/pre-commit b/.husky/pre-commit index 0116fd61..6a31286a 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,5 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -yarn unibuild build readme +yarn readme git add README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6c33332..52ad0dcc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,11 +7,11 @@ I love receiving pull requests from everyone! Please read this short document be ### `README.md` Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. - - to make changes in the first part, go to [docs/README.hbs](docs/README.hbs) + - to make changes in the first part, go to [INTRO.md](INTRO.md) - the api docs are generated from JSdoc comment embedded in the code, so changing those comments will result in API doc changes. -When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `README.hbs` changes and/or API doc changes. +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. ## Pull request guidelines diff --git a/doc/README.hbs b/INTRO.md similarity index 99% rename from doc/README.hbs rename to INTRO.md index fb14c582..3f28a0fd 100644 --- a/doc/README.hbs +++ b/INTRO.md @@ -360,5 +360,3 @@ use those to change the generated output. Note: all classes, methods and constants that are documented here can be considered public API and will only be subject to breaking changes between major versions. - -{{>main}} diff --git a/README.md b/README.md index 106cfbbf..3871d3e1 100644 --- a/README.md +++ b/README.md @@ -361,1823 +361,161716 @@ use those to change the generated output. Note: all classes, methods and constants that are documented here can be considered public API and will only be subject to breaking changes between major versions. + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + +# ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +## Installation + +### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +## How to ...? + +### Parse chord sheet + +#### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +#### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +#### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +### Display a parsed sheet + +#### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +#### HTML format + +##### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +##### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +#### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +#### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +#### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +#### Clone + +```javascript +var chord2 = chord.clone(); +``` + +#### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +#### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +#### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +#### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +#### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +#### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +#### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +## Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +## API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +{{>main}} + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + + + +**chordsheetjs** • [**Docs**](#globalsmd) + +*** + + + +**chordsheetjs** • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L48) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L25) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L46) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L35) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L18) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L74) + +*** + +#### parse() + +> `static` **parse**(`chordDefinition`): [`ChordDefinition`](#classeschorddefinitionmd) + +Parses a chord definition in the form of: +- base-fret frets +- base-fret frets fingers + +##### Parameters + +• **chordDefinition**: `string` + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### See + +https://chordpro.org/chordpro/directives-define/#common-usage + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L63) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L87) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#readmemd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/template_helpers.ts#L98) + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L48) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L25) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L46) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L35) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L18) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L74) + +*** + +#### parse() + +> `static` **parse**(`chordDefinition`): [`ChordDefinition`](#classeschorddefinitionmd) + +Parses a chord definition in the form of: +- base-fret frets +- base-fret frets fingers + +##### Parameters + +• **chordDefinition**: `string` + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### See + +https://chordpro.org/chordpro/directives-define/#common-usage + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L63) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/template_helpers.ts#L98) + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L48) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L25) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L46) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L35) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L18) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L74) + +*** + +#### parse() + +> `static` **parse**(`chordDefinition`): [`ChordDefinition`](#classeschorddefinitionmd) + +Parses a chord definition in the form of: +- base-fret frets +- base-fret frets fingers + +##### Parameters + +• **chordDefinition**: `string` + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### See + +https://chordpro.org/chordpro/directives-define/#common-usage + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/chord_definition.ts#L63) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/527a821c6e115173be348231ebc50a4eabaf8d07/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [docs/README.hbs](docs/README.hbs) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `README.hbs` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/# Classes[**chordsheetjs**](#readmemd) • **Docs***** +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/9f253175713caec7da72f86d7b0f5039f75675e7/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/# Classes[**chordsheetjs**](#readmemd) • **Docs***** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/9c6f2f6de369bd12244e28526047676dd5086772/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/## ChordSheetJS [![Code Climate] (https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +### Installation + +#### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +#### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +### How to ...? + +#### Parse chord sheet + +##### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +##### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +##### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +#### Display a parsed sheet + +##### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +##### HTML format + +###### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +###### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +##### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +#### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +#### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +#### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +##### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +##### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +##### Clone + +```javascript +var chord2 = chord.clone(); +``` + +##### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +##### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +##### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +##### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +##### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +##### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +##### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +### Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +#### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +#### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +#### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +#### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +#### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +#### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +#### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +### API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/d805978198f509dfe0efce007e52383e71cc4e03/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/# Classes[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/## ChordSheetJS [![Code Climate] (https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +### Installation + +#### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +#### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +### How to ...? + +#### Parse chord sheet + +##### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +##### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +##### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +#### Display a parsed sheet + +##### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +##### HTML format + +###### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +###### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +##### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +#### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +#### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +#### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +##### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +##### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +##### Clone + +```javascript +var chord2 = chord.clone(); +``` + +##### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +##### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +##### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +##### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +##### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +##### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +##### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +### Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +#### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +#### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +#### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +#### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +#### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +#### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +#### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +### API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/956687aab3df1c6afbbb8917f52bff1df79e3487/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/# Classes +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/1d391914f2f2f235116ce04eee25b824f55cbd64/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/## ChordSheetJS [![Code Climate] (https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +### Installation + +#### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +#### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +### How to ...? + +#### Parse chord sheet + +##### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +##### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +##### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +#### Display a parsed sheet + +##### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +##### HTML format + +###### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +###### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +##### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +#### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +#### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +#### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +##### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +##### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +##### Clone + +```javascript +var chord2 = chord.clone(); +``` + +##### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +##### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +##### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +##### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +##### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +##### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +##### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +### Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +#### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +#### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +#### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +#### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +#### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +#### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +#### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +### API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/77a410d4d57e0ffe84297dd406df70b9959c6efa/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/# Classes + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/ +## ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +### Installation + +#### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +#### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +### How to ...? + +#### Parse chord sheet + +##### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +##### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +##### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +#### Display a parsed sheet + +##### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +##### HTML format + +###### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +###### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +##### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +#### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +#### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +#### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +##### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +##### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +##### Clone + +```javascript +var chord2 = chord.clone(); +``` + +##### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +##### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +##### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +##### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +##### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +##### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +##### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +### Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +#### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +#### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +#### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +#### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +#### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +#### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +#### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +### API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/449e527291c25800ca50b092b383bcedc35f71d4/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/ + +## ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +### Installation + +#### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +#### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +### How to ...? + +#### Parse chord sheet + +##### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +##### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +##### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +#### Display a parsed sheet + +##### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +##### HTML format + +###### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +###### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +##### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +#### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +#### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +#### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +##### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +##### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +##### Clone + +```javascript +var chord2 = chord.clone(); +``` + +##### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +##### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +##### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +##### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +##### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +##### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +##### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +### Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +#### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +#### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +#### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +#### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +#### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +#### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +#### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +### API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/ +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/b22132be8dca0b2d45e734d44c483517a79d6e45/src/template_helpers.ts#L98) + +# Media + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](#_mediaintromd) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/ + + + +## ChordSheetJS [![Code Climate](https://codeclimate.com/github/martijnversluis/ChordSheetJS/badges/gpa.svg)](https://codeclimate.com/github/martijnversluis/ChordSheetJS) [![CI](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/ci.yml?query=branch%3Amaster) [![Release](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml/badge.svg)](https://github.com/martijnversluis/ChordSheetJS/actions/workflows/release.yml) + +A JavaScript library for parsing and formatting chord sheets + +**Contents** + +- [Installation](#installation) +- [How to ...?](#how-to-) +- [Supported ChordPro directives](#supported-chordpro-directives) +- [API docs](#api-docs) +- [Contributing](#_mediacontributingmd) + +### Installation + +#### Package managers + +`ChordSheetJS` is on npm, to install run: + +```bash +npm install chordsheetjs +``` + +Load with `import`: + +```javascript +import ChordSheetJS from 'chordsheetjs'; +``` + +or `require()`: + +```javascript +var ChordSheetJS = require('chordsheetjs').default; +``` + +#### Standalone bundle file + +If you're not using a build tool, you can download and use the `bundle.js` from the +[latest release](https://github.com/martijnversluis/ChordSheetJS/releases/latest): + +```html + + +``` + +### How to ...? + +#### Parse chord sheet + +##### Regular chord sheets + +```javascript +const chordSheet = ` + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.ChordsOverWordsParser(); +const song = parser.parse(chordSheet); +``` + +##### Ultimate Guitar chord sheets + +```javascript +const chordSheet = ` +[Chorus] + Am C/G F C +Let it be, let it be, let it be, let it be +C G F C/E Dm C +Whisper words of wisdom, let it be`.substring(1); + +const parser = new ChordSheetJS.UltimateGuitarParser(); +const song = parser.parse(chordSheet); +``` + +##### Chord pro format + +```javascript +const chordSheet = ` +{title: Let it be} +{subtitle: ChordSheetJS example version} + +{start_of_chorus: Chorus} +Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be +[C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] +{end_of_chorus}`.substring(1); + +const parser = new ChordSheetJS.ChordProParser(); +const song = parser.parse(chordSheet); +``` + +#### Display a parsed sheet + +##### Plain text format + +```javascript +const formatter = new ChordSheetJS.TextFormatter(); +const disp = formatter.format(song); +``` + +##### HTML format + +###### Table-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlTableFormatter(); +const disp = formatter.format(song); +``` + +###### Div-based layout + +```javascript +const formatter = new ChordSheetJS.HtmlDivFormatter(); +const disp = formatter.format(song); +``` + +##### Chord pro format + +```javascript +const formatter = new ChordSheetJS.ChordProFormatter(); +const disp = formatter.format(song); +``` + +#### Serialize/deserialize + +Chord sheets (`Song`s) can be serialized to plain JavaScript objects, which can be converted to JSON, XML etc by +third-party libraries. The serialized object can also be deserialized back into a `Song`. + +```javascript +const serializedSong = new ChordSheetSerializer().serialize(song); +const deserialized = new ChordSheetSerializer().deserialize(serializedSong); +``` + +#### Add styling + +The HTML formatters (HtmlTableFormatter and HtmlDivFormatter) can provide basic CSS to help with styling the output: + +```javascript +HtmlTableFormatter.cssString(); +// .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssString('.chordSheetViewer'); +// .chordSheetViewer .paragraph { +// margin-bottom: 1em; +// } + +HtmlTableFormatter.cssObject(); +// '.paragraph': { +// marginBottom: '1em' +// } +``` + +#### Parsing and modifying chords + +```javascript +import { Chord } from 'chordsheetjs'; +``` + +##### Parse + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +``` + +Parse numeric chords (Nashville system): + +```javascript +const chord = Chord.parse('b1sus4/#3'); +``` + +##### Display with #toString + +Use #toString() to convert the chord to a chord string (eg Dsus/F#) + +```javascript +const chord = Chord.parse('Ebsus4/Bb'); +chord.toString(); // --> "Ebsus4/Bb" +``` + +##### Clone + +```javascript +var chord2 = chord.clone(); +``` + +##### Normalize + +Normalizes keys B#, E#, Cb and Fb to C, F, B and E + +```javascript +const chord = Chord.parse('E#/B#'); +normalizedChord = chord.normalize(); +normalizedChord.toString(); // --> "F/C" +``` + +##### ~~Switch modifier~~ + +***Deprecated*** + +Convert # to b and vice versa + +```javascript +const chord = parseChord('Eb/Bb'); +const chord2 = chord.switchModifier(); +chord2.toString(); // --> "D#/A#" +``` + +##### Use specific modifier + +Set the chord to a specific modifier (# or b) + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('#'); +chord2.toString(); // --> "D#/A#" +``` + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.useModifier('b'); +chord2.toString(); // --> "Eb/Bb" +``` + +##### Transpose up + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeUp(); +chord2.toString(); // -> "E/B" +``` + +##### Transpose down + +```javascript +const chord = Chord.parse('Eb/Bb'); +const chord2 = chord.transposeDown(); +chord2.toString(); // -> "D/A" +``` + +##### Transpose + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(4); +chord2.toString(); // -> "E/G#" +``` + +```javascript +const chord = Chord.parse('C/E'); +const chord2 = chord.transpose(-4); +chord2.toString(); // -> "Ab/C" +``` + +##### Convert numeric chord to chord symbol + +```javascript +const numericChord = Chord.parse('2/4'); +const chordSymbol = numericChord.toChordSymbol('E'); +chordSymbol.toString(); // -> "F#/A" +``` + +### Supported ChordPro directives + +All directives are parsed and are added to `Song.metadata`. The list below indicates whether formatters actually +use those to change the generated output. + +:heavy_check_mark: = supported + +:clock2: = will be supported in a future version + +:heavy_multiplication_x: = currently no plans to support it in the near future + +#### Meta-data directives + +| Directive | Support | +|:---------------- |:------------------:| +| title (short: t) | :heavy_check_mark: | +| subtitle | :heavy_check_mark: | +| artist | :heavy_check_mark: | +| composer | :heavy_check_mark: | +| lyricist | :heavy_check_mark: | +| copyright | :heavy_check_mark: | +| album | :heavy_check_mark: | +| year | :heavy_check_mark: | +| key | :heavy_check_mark: | +| time | :heavy_check_mark: | +| tempo | :heavy_check_mark: | +| duration | :heavy_check_mark: | +| capo | :heavy_check_mark: | +| meta | :heavy_check_mark: | + +#### Formatting directives + +| Directive | Support | +|:-------------------------- |:------------------------:| +| comment (short: c) | :heavy_check_mark: | +| comment_italic (short: ci) | :heavy_multiplication_x: | +| comment_box (short: cb) | :heavy_multiplication_x: | +| chorus | :heavy_multiplication_x: | +| image | :heavy_multiplication_x: | + +#### Environment directives + +| Directive | Support | +|:---------------------------- |:------------------:| +| start_of_chorus (short: soc) | :heavy_check_mark: | +| end_of_chorus (short: eoc) | :heavy_check_mark: | +| start_of_verse | :heavy_check_mark: | +| end_of_verse | :heavy_check_mark: | +| start_of_tab (short: sot) | :heavy_check_mark: | +| end_of_tab (short: eot) | :heavy_check_mark: | +| start_of_grid | :heavy_check_mark: | +| end_of_grid | :heavy_check_mark: | + +#### Chord diagrams + +| Directive | Support | +|:--------- |:------------------:| +| define | :heavy_check_mark: | +| chord | :heavy_check_mark: | + +#### Fonts, sizes and colours + +| Directive | Support | +|:----------- |:------------------------:| +| textfont | :heavy_check_mark: | +| textsize | :heavy_check_mark: | +| textcolour | :heavy_check_mark: | +| chordfont | :heavy_check_mark: | +| chordsize | :heavy_check_mark: | +| chordcolour | :heavy_check_mark: | +| tabfont | :heavy_multiplication_x: | +| tabsize | :heavy_multiplication_x: | +| tabcolour | :heavy_multiplication_x: | + +#### Output related directives + +| Directive | Support | +|:------------------------------ |:------------------------:| +| new_page (short: np) | :heavy_multiplication_x: | +| new_physical_page (short: npp) | :heavy_multiplication_x: | +| column_break (short: cb) | :heavy_multiplication_x: | +| grid (short: g) | :heavy_multiplication_x: | +| no_grid (short: ng) | :heavy_multiplication_x: | +| titles | :heavy_multiplication_x: | +| columns (short: col) | :heavy_multiplication_x: | + +#### Custom extensions + +| Directive | Support | +|:--------- |:------------------:| +| x_ | :heavy_check_mark: | + +### API docs + +Note: all classes, methods and constants that are documented here can be considered public API and will only be +subject to breaking changes between major versions. + +# Classes + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L44) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L96) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_pro_parser.ts#L36) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L173) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L124) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L114) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chords_over_words_parser.ts#L71) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L21) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L26) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L225) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L213) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L15) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L70) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L28) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/soft_line_break.ts#L2) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L322) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L465) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L473) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L469) + +*** + +#### set() + +> **set**(`__namedParameters`): [`Tag`](#classestagmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.value**: `string` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L563) + +*** + +#### toString() + +> **toString**(): `string` + +Returns a string representation of an object. + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L559) + +*** + +#### parse() + +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L437) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` \| [`Tag`](#classestagmd) + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L455) + +*** + +#### parseWithRegex() + +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) + +##### Parameters + +• **tag**: `string` + +• **regex**: `RegExp` + +##### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L445) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Ternary + +## Class: Ternary + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Ternary() + +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **\_\_namedParameters**: `TernaryProperties` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L24) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### falseExpression + +> **falseExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L22) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +*** + +#### trueExpression + +> **trueExpression**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L20) + +*** + +#### valueTest + +> **valueTest**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L18) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L16) + +### Methods + +#### clone() + +> **clone**(): [`Ternary`](#classesternarymd) + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L98) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` + +Evaluate the meta expression + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +The metadata object to use for evaluating the expression + +• **metadataSeparator?**: `string` + +The metadata separator to use if necessary + +• **upperContext?**: `null` \| `string` = `null` + +##### Returns + +`string` + +The evaluated expression + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L48) + +*** + +#### evaluateForTruthyValue() + +> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +• **value**: `string` \| `string`[] + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L86) + +*** + +#### evaluateToString() + +> **evaluateToString**(`value`, `metadataSeparator`): `string` + +##### Parameters + +• **value**: `string` \| `string`[] + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L60) + +*** + +#### evaluateWithVariable() + +> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L68) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L94) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TextFormatter + +## Class: TextFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new TextFormatter() + +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`TextFormatter`](#classestextformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L17) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L102) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L24) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L33) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L161) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L129) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L66) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L87) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + ## Classes -
-
ChordSheetSerializer
-

Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#Song)

-
ChordLyricsPair
-

Represents a chord with the corresponding (partial) lyrics

-
Comment
-

Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview

-
Line
-

Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag

-
Metadata
-

Stores song metadata. Properties can be accessed using the get() method:

-

const metadata = new Metadata({ author: 'John' }); -metadata.get('author') // => 'John'

-

See [get](#Metadata+get)

-
Paragraph
-

Represents a paragraph of lines in a chord sheet

-
Song
-

Represents a song in a chord sheet. Currently a chord sheet can only have one song.

-
Tag
-

Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/

-
Chord
-

Represents a Chord, consisting of a root, suffix (quality) and bass

-
ChordProFormatter
-

Formats a song into a ChordPro chord sheet

-
ChordsOverWordsFormatter
-

Formats a song into a plain text chord sheet

-
Formatter
-

Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object

-
HtmlDivFormatter
-

Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages.

-
HtmlFormatter
-

Acts as a base class for HTML formatters

-
HtmlTableFormatter
-

Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like -PDF conversion.

-
TextFormatter
-

Formats a song into a plain text chord sheet

-
Key
-

Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral).

-

The only function considered public API is Key.distance

-
ChordProParser
-

Parses a ChordPro chord sheet

-
ChordSheetParser
-

Parses a normal chord sheet

-

ChordSheetParser is deprecated, please use ChordsOverWordsParser.

-

ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks -support for many variations. Besides that, some chordpro feature have been ported back -to ChordsOverWordsParser, which adds some interesting functionality.

-
ChordsOverWordsParser
-

Parses a chords over words sheet into a song

-

It support "regular" chord sheets:

-
       Am         C/G        F          C
-Let it be, let it be, let it be, let it be
-C                G              F  C/E Dm C
-Whisper words of wisdom, let it be
-
-

Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives:

-
{title: Let it be}
-{key: C}
-Chorus 1:
-       Am
-Let it be
-
-

For convenience, you can leave out the brackets:

-
title: Let it be
-Chorus 1:
-       Am
-Let it be
-
-

You can even use a markdown style frontmatter separator to separate the header from the song:

-
title: Let it be
-key: C
----
-Chorus 1:
-       Am         C/G        F          C
-Let it be, let it be, let it be, let it be
-C                G              F  C/E Dm C
-Whisper words of wisdom, let it be
-
-

ChordsOverWordsParser is the better version of ChordSheetParser, which is deprecated.

-
ParserWarning
-

Represents a parser warning, currently only used by ChordProParser.

-
UltimateGuitarParser
-

Parses an Ultimate Guitar chord sheet with metadata -Inherits from [ChordSheetParser](#ChordSheetParser)

-
- -## Constants - -
-
ALBUM : string
-

Album meta directive. See https://www.chordpro.org/chordpro/directives-album/

-
ARRANGER : string
-

Arranger meta directive. See https://chordpro.org/chordpro/directives-arranger/

-
ARTIST : string
-

Artist meta directive. See https://www.chordpro.org/chordpro/directives-artist/

-
CAPO : string
-

Capo meta directive. See https://www.chordpro.org/chordpro/directives-capo/

-
COMMENT : string
-

Comment directive. See https://www.chordpro.org/chordpro/directives-comment/

-
COMPOSER : string
-

Composer meta directive. See https://www.chordpro.org/chordpro/directives-composer/

-
COPYRIGHT : string
-

Copyright meta directive. See https://www.chordpro.org/chordpro/directives-copyright/

-
DURATION : string
-

Duration meta directive. See https://www.chordpro.org/chordpro/directives-duration/

-
END_OF_ABC : string
-

End of ABC music notation section See https://chordpro.org/chordpro/directives-env_abc/

-
END_OF_BRIDGE : string
-

End of bridge directive. See https://chordpro.org/chordpro/directives-env_bridge/

-
END_OF_CHORUS : string
-

End of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/

-
END_OF_GRID : string
-

End of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/

-
END_OF_LY : string
-

End of Lilypond music notation section See https://chordpro.org/chordpro/directives-env_ly/

-
END_OF_TAB : string
-

End of tab directive. See https://www.chordpro.org/chordpro/directives-env_tab/

-
END_OF_VERSE : string
-

End of verse directive. See https://www.chordpro.org/chordpro/directives-env_verse/

-
KEY : string
-

Key meta directive. See https://www.chordpro.org/chordpro/directives-key/

-
_KEY : string
-

_Key meta directive. Reflects the key as transposed by the capo value -See https://www.chordpro.org/chordpro/directives-key/

-
LYRICIST : string
-

Lyricist meta directive. See https://www.chordpro.org/chordpro/directives-lyricist/

-
SORTTITLE : string
-

Sorttitle meta directive. See https://chordpro.org/chordpro/directives-sorttitle/

-
START_OF_ABC : string
-

Start of ABC music notation section See https://chordpro.org/chordpro/directives-env_abc/

-
START_OF_BRIDGE : string
-

Start of bridge directive. See https://chordpro.org/chordpro/directives-env_bridge/

-
START_OF_CHORUS : string
-

Start of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/

-
START_OF_GRID : string
-

Start of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/

-
START_OF_LY : string
-

Start of Lilypond music notation section See https://chordpro.org/chordpro/directives-env_ly/

-
START_OF_TAB : string
-

Start of tab directive. See https://www.chordpro.org/chordpro/directives-env_tab/

-
START_OF_VERSE : string
-

Start of verse directive. See https://www.chordpro.org/chordpro/directives-env_verse/

-
SUBTITLE : string
-

Subtitle meta directive. See https://www.chordpro.org/chordpro/directives-subtitle/

-
TEMPO : string
-

Tempo meta directive. See https://www.chordpro.org/chordpro/directives-tempo/

-
TIME : string
-

Time meta directive. See https://www.chordpro.org/chordpro/directives-time/

-
TITLE : string
-

Title meta directive. See https://www.chordpro.org/chordpro/directives-title/

-
TRANSPOSE : string
-

Transpose meta directive. See: https://www.chordpro.org/chordpro/directives-transpose/

-
NEW_KEY : string
-

New Key meta directive. See: https://github.com/PraiseCharts/ChordChartJS/issues/53

-
YEAR : string
-

Year meta directive. See https://www.chordpro.org/chordpro/directives-year/

-
CHORDFONT : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_chord_legacy/

-
CHORDSIZE : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_chord_legacy/

-
CHORDCOLOUR : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_chord_legacy/

-
TEXTFONT : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_text_legacy/

-
TEXTSIZE : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_text_legacy/

-
TEXTCOLOUR : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_text_legacy/

-
TITLEFONT : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_title_legacy/

-
TITLESIZE : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_title_legacy/

-
TITLECOLOUR : string
-

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_title_legacy/

-
CHORUS : string
-

Chorus directive. Support repeating an earlier defined section. -See https://www.chordpro.org/chordpro/directives-env_chorus/

-
CHORD_STYLE : string
-

Chord type directive. Determines the type of chords used in the rendered chord sheet. -Possible values are 'solfege', 'symbol', 'numeral' and 'number'

-
BRIDGE : string
-

Used to mark a paragraph as bridge

-
CHORUS : string
-

Used to mark a paragraph as chorus

-
GRID : string
-

Used to mark a paragraph as grid

-
INDETERMINATE : string
-

Used to mark a paragraph as containing lines with both verse and chorus type

-
NONE : string
-

Used to mark a paragraph as not containing a line marked with a type

-
TAB : string
-

Used to mark a paragraph as tab

-
VERSE : string
-

Used to mark a paragraph as verse

-
LILYPOND : string
-

Used to mark a section as Lilypond notation

-
ABC : string
-

Used to mark a section as ABC music notation

-
- -## Functions - -
-
scopedCss(scope)string
-

Generates basic CSS, scoped within the provided selector, to use with output generated by [HtmlTableFormatter](#HtmlTableFormatter)

-
scopedCss(scope)string
-

Generates basic CSS, scoped within the provided selector, to use with output generated by [HtmlTableFormatter](#HtmlTableFormatter)

-
getCapos(key)Object.<string, string>
-

Returns applicable capos for the provided key

-
getKeys(key)Array.<string>
-

Returns applicable keys to transpose to from the provided key

-
- - - -## ChordSheetSerializer -

Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#Song)

- -**Kind**: global class - -* [ChordSheetSerializer](#ChordSheetSerializer) - * [.serialize()](#ChordSheetSerializer+serialize) ⇒ - * [.deserialize(serializedSong)](#ChordSheetSerializer+deserialize) ⇒ [Song](#Song) - - - -### chordSheetSerializer.serialize() ⇒ -

Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc -Can be deserialized using [deserialize](deserialize)

- -**Kind**: instance method of [ChordSheetSerializer](#ChordSheetSerializer) -**Returns**:

object A plain JS object containing all chord sheet data

- - -### chordSheetSerializer.deserialize(serializedSong) ⇒ [Song](#Song) -

Deserializes a song that has been serialized using [serialize](serialize)

- -**Kind**: instance method of [ChordSheetSerializer](#ChordSheetSerializer) -**Returns**: [Song](#Song) -

The deserialized song

- -| Param | Type | Description | -| --- | --- | --- | -| serializedSong | object |

The serialized song

| - - - -## ChordLyricsPair -

Represents a chord with the corresponding (partial) lyrics

- -**Kind**: global class - -* [ChordLyricsPair](#ChordLyricsPair) - * [new ChordLyricsPair(chords, lyrics, annotation)](#new_ChordLyricsPair_new) - * [.chords](#ChordLyricsPair+chords) : string - * [.lyrics](#ChordLyricsPair+lyrics) : string - * [.annotation](#ChordLyricsPair+annotation) : string - * [.isRenderable()](#ChordLyricsPair+isRenderable) ⇒ boolean - * [.clone()](#ChordLyricsPair+clone) ⇒ [ChordLyricsPair](#ChordLyricsPair) - - - -### new ChordLyricsPair(chords, lyrics, annotation) -

Initialises a ChordLyricsPair

+- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L62) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L13) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L27) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L55) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L34) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L77) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L76) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L78) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L41) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L48) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) + +#### HtmlDivFormatter + +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) + +#### HtmlTableFormatter + +> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) + +#### INDETERMINATE + +> **INDETERMINATE**: `string` + +#### Line + +> **Line**: *typeof* [`Line`](#classeslinemd) + +#### Literal + +> **Literal**: *typeof* [`Literal`](#classesliteralmd) + +#### Metadata + +> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) + +#### NONE + +> **NONE**: `string` + +#### Paragraph + +> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) + +#### SoftLineBreak + +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) + +#### Song + +> **Song**: *typeof* [`Song`](#classessongmd) + +#### TAB + +> **TAB**: `string` + +#### Tag + +> **Tag**: *typeof* [`Tag`](#classestagmd) + +#### Ternary + +> **Ternary**: *typeof* [`Ternary`](#classesternarymd) + +#### TextFormatter + +> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) + +#### UltimateGuitarParser + +> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +#### VERSE + +> **VERSE**: `string` + +### Defined in + +[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/index.ts#L75) + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / templateHelpers + +## Variable: templateHelpers + +> **templateHelpers**: `object` + +### Type declaration + +#### each() + +> **each**: (`collection`, `callback`) => `string` + +##### Parameters + +• **collection**: `any`[] + +• **callback**: `EachCallback` + +##### Returns + +`string` + +#### evaluate() + +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **configuration**: `Configuration` + +##### Returns + +`string` + +#### fontStyleTag() + +> **fontStyleTag**: (`font`) => `string` + +##### Parameters + +• **font**: `Font` + +##### Returns + +`string` + +#### hasChordContents() + +> **hasChordContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### hasTextContents() + +> **hasTextContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### isChordLyricsPair() + +> **isChordLyricsPair**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isComment() + +> **isComment**: (`item`) => `boolean` + +##### Parameters + +• **item**: [`Tag`](#classestagmd) + +##### Returns + +`boolean` + +#### isEvaluatable() + +> **isEvaluatable**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### isTag() + +> **isTag**: (`item`) => `boolean` + +##### Parameters + +• **item**: `Item` + +##### Returns + +`boolean` + +#### lineClasses() + +> **lineClasses**: (`line`) => `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +#### lineHasContents() + +> **lineHasContents**: (`line`) => `boolean` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`boolean` + +#### paragraphClasses() + +> **paragraphClasses**: (`paragraph`) => `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +##### Returns + +`string` + +#### renderChord() + +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` + +##### Parameters + +• **chordString**: `string` + +• **line**: [`Line`](#classeslinemd) + +• **song**: [`Song`](#classessongmd) + +• **\_\_namedParameters**: `RenderChordOptions` = `{}` + +##### Returns + +`string` + +#### stripHTML() + +> **stripHTML**: (`string`) => `string` + +##### Parameters + +• **string**: `string` + +##### Returns + +`string` + +#### when() + +> **when**: (`condition`, `callback`?) => `When` + +##### Parameters + +• **condition**: `any` + +• **callback?**: `WhenCallback` + +##### Returns + +`When` + +### Defined in + +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/template_helpers.ts#L98) + +# Media + + + + +## Contributing + +I love receiving pull requests from everyone! Please read this short document before you start, + +### ⚠️ Gotchas + +#### `README.md` + +Are you trying to make changes to `README.md`? Wait! `README.md` is a auto-generated file. + - to make changes in the first part, go to [INTRO.md](INTRO.md) + - the api docs are generated from JSdoc comment embedded in the code, so changing those + comments will result in API doc changes. + +When your changes are complete, be sure to run `yarn readme` to regenerate `README.md` and commit the updated `README.md` _together_ with the `INTRO.md` changes and/or API doc changes. + +### Pull request guidelines + +N.B. I do not expect you to have all required knowledge and experience to meet these guidelines; +I'm happy to help you out! ❤️ +However, the better your PR meets these guidelines the sooner it will get merged. + +- try to use a code style that is consistent with the existing code +- code changes go hand in hand with tests. +- if possible, write a test that proves the bug before writing/changing code to fix it +- if new code you contribute is expected to be public API (called directly by users instead of only used within ChordSheetJS), + you'd make me really happy by adding JSdoc comments. +- write a [good commit message][commit]. If your PR resolves an issue you can [link it to your commit][link_issue]. + +[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[link_issue]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword +### Get started + +Ensure your have NodeJS and Yarn on your machine. The [CI workflow][ci_workflow] lists the NodeJS versions that +are expected to work. + +[ci_workflow]: https://github.com/martijnversluis/ChordSheetJS/blob/master/.github/workflows/ci.yml#L17 +Fork, then clone the repo: + + git clone git@github.com:your-username/ChordSheetJS.git + +ChordSheetJS uses Yarn 4. For that to work, Corepack need to be enabled: + + corepack enable + +⚠️ NB: In my experience this only guaranteed to work when using Node's Yarn. + Yarn installed by an external package manager (like Homebrew) will/might not work. + +Install the required node modules: + + yarn install + +Make sure the tests pass: + + yarn test + +Make your change. Add tests for your change. Make the tests pass: + + yarn test + +Push to your fork and [submit a pull request][pr]. + +[pr]: https://github.com/martijnversluis/ChordSheetJS/compare/ +# Classes + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Chord + +## Class: Chord + +Represents a Chord, consisting of a root, suffix (quality) and bass + +### Implements + +- `ChordProperties` + +### Constructors + +#### new Chord() + +> **new Chord**(`__namedParameters`): [`Chord`](#classeschordmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bass?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.bassBase?**: `null` \| `string` \| `number` = `null` + +• **\_\_namedParameters.bassModifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.chordType?**: `null` \| `ChordType` = `null` + +• **\_\_namedParameters.modifier?**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.root?**: `null` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters.suffix?**: `null` \| `string` = `null` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:344](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L344) + +### Properties + +#### bass + +> **bass**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.bass` + +##### Defined in + +[chord.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L24) + +*** + +#### root + +> **root**: `null` \| [`Key`](#classeskeymd) + +##### Implementation of + +`ChordProperties.root` + +##### Defined in + +[chord.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L26) + +*** + +#### suffix + +> **suffix**: `null` \| `string` + +##### Implementation of + +`ChordProperties.suffix` + +##### Defined in + +[chord.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L28) + +### Methods + +#### clone() + +> **clone**(): [`Chord`](#classeschordmd) + +Returns a deep copy of the chord + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L60) + +*** + +#### equals() + +> **equals**(`otherChord`): `boolean` + +##### Parameters + +• **otherChord**: [`Chord`](#classeschordmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:374](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L374) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +Determines whether the chord is a chord solfege + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L160) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +Determines whether the chord is a chord symbol + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:110](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L110) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:432](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L432) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +Determines whether the chord is a numeral + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:246](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L246) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +Determines whether the chord is numeric + +##### Returns + +`boolean` + +##### Defined in + +[chord.ts:227](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L227) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Chord`](#classeschordmd) + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:436](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L436) + +*** + +#### normalize() + +> **normalize**(`key`?, `options`?): [`Chord`](#classeschordmd) + +Normalizes the chord root and bass notes: +- Fab becomes Mi +- Dob becomes Si +- Si# becomes Do +- Mi# becomes Fa +- Fb becomes E +- Cb becomes B +- B# becomes C +- E# becomes F +- 4b becomes 3 +- 1b becomes 7 +- 7# becomes 1 +- 3# becomes 4 + +Besides that it normalizes the suffix if `normalizeSuffix` is `true`. +For example, `sus2` becomes `2`, `sus4` becomes `sus`. +All suffix normalizations can be found in `src/normalize_mappings/suffix-mapping.txt`. + +When the chord is minor, bass notes are normalized off of the relative major +of the root note. For example, `Em/A#` becomes `Em/Bb`. + +##### Parameters + +• **key?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the key to normalize to + +• **options?** = `{}` + +options + +• **options.normalizeSuffix?**: `undefined` \| `boolean` = `true` + +whether to normalize the chord suffix after transposing + +##### Returns + +[`Chord`](#classeschordmd) + +the normalized chord + +##### Defined in + +[chord.ts:294](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L294) + +*** + +#### set() + +> **set**(`properties`): [`Chord`](#classeschordmd) + +##### Parameters + +• **properties**: `ChordProperties` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:442](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L442) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord solfege, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `Mi` will return the chord symbol `La#`. +When the chord is already a chord solfege, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord solfege + +##### Defined in + +[chord.ts:122](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L122) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`referenceKey`?): `string` + +Converts the chord to a chord solfege string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord solfege `A#`. +When the chord is already a chord solfege, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord solfege string + +##### See + +##### Defined in + +[chord.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L152) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a chord symbol, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a clone of the object. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +[`Chord`](#classeschordmd) + +the chord symbol + +##### Defined in + +[chord.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L72) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`referenceKey`?): `string` + +Converts the chord to a chord symbol string, using the supplied key as a reference. +For example, a numeric chord `#4` with reference key `E` will return the chord symbol `A#`. +When the chord is already a chord symbol, it will return a string version of the chord. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a +numeric or numeral. + +##### Returns + +`string` + +the chord symbol string + +##### See + +##### Defined in + +[chord.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L102) + +*** + +#### toNumeral() + +> **toNumeral**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeral chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #IV. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeral chord + +##### Defined in + +[chord.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L194) + +*** + +#### toNumeralString() + +> **toNumeralString**(`referenceKey`?): `string` + +Converts the chord to a numeral chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeral chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeral chord string + +##### See + +##### Defined in + +[chord.ts:219](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L219) + +*** + +#### toNumeric() + +> **toNumeric**(`referenceKey`?): [`Chord`](#classeschordmd) + +Converts the chord to a numeric chord, using the supplied key as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +[`Chord`](#classeschordmd) + +the numeric chord + +##### Defined in + +[chord.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L170) + +*** + +#### toNumericString() + +> **toNumericString**(`referenceKey`?): `string` + +Converts the chord to a numeric chord string, using the supplied kye as a reference. +For example, a chord symbol A# with reference key E will return the numeric chord #4. + +##### Parameters + +• **referenceKey?**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +the reference key. The key is required when converting a chord symbol + +##### Returns + +`string` + +the numeric chord string + +##### See + +##### Defined in + +[chord.ts:238](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L238) + +*** + +#### toString() + +> **toString**(`configuration`?): `string` + +Converts the chord to a string, eg `Esus4/G#` or `1sus4/#3` + +##### Parameters + +• **configuration?** = `{}` + +options + +• **configuration.useUnicodeModifier?**: `undefined` \| `boolean` = `false` + +Whether or not to use unicode modifiers. +This will make `#` (sharp) look like `♯` and `b` (flat) look like `♭` + +##### Returns + +`string` + +the chord string + +##### Defined in + +[chord.ts:257](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L257) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Chord`](#classeschordmd) + +Transposes the chord by the specified number of semitones + +##### Parameters + +• **delta**: `number` + +de number of semitones + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:340](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L340) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Chord`](#classeschordmd) + +Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:331](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L331) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Chord`](#classeschordmd) + +Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E + +##### Returns + +[`Chord`](#classeschordmd) + +the new, transposed chord + +##### Defined in + +[chord.ts:323](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L323) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Chord`](#classeschordmd) + +Switches to the specified modifier + +##### Parameters + +• **newModifier**: `Modifier` + +the modifier to use: `'#'` or `'b'` + +##### Returns + +[`Chord`](#classeschordmd) + +the new, changed chord + +##### Defined in + +[chord.ts:315](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L315) + +*** + +#### determineBass() + +> `static` **determineBass**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.bass**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.bassBase**: `null` \| `string` \| `number` + +• **\_\_namedParameters.bassModifier**: `null` \| `Modifier` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:407](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L407) + +*** + +#### determineRoot() + +> `static` **determineRoot**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.base**: `null` \| `string` \| `number` + +• **\_\_namedParameters.chordType**: `null` \| `ChordType` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.root**: `null` \| [`Key`](#classeskeymd) + +• **\_\_namedParameters.suffix**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[chord.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L380) + +*** + +#### parse() + +> `static` **parse**(`chordString`): `null` \| [`Chord`](#classeschordmd) + +Tries to parse a chord string into a chord +Any leading or trailing whitespace is removed first, so a chord like ` \n E/G# \r ` is valid. + +##### Parameters + +• **chordString**: `string` + +the chord string, eg `Esus4/G#` or `1sus4/#3`. + +##### Returns + +`null` \| [`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L36) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`chordString`): [`Chord`](#classeschordmd) + +##### Parameters + +• **chordString**: `string` + +##### Returns + +[`Chord`](#classeschordmd) + +##### Defined in + +[chord.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord.ts#L44) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordDefinition + +## Class: ChordDefinition + +Represents a chord definition. + +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +### Constructors + +#### new ChordDefinition() + +> **new ChordDefinition**(`name`, `baseFret`, `frets`, `fingers`?): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Parameters + +• **name**: `string` + +• **baseFret**: `number` + +• **frets**: `Fret`[] + +• **fingers?**: `number`[] + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:47](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L47) + +### Properties + +#### baseFret + +> **baseFret**: `number` + +Defines the offset for the chord, which is the position of the topmost finger. +The offset must be 1 or higher. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L24) + +*** + +#### fingers + +> **fingers**: `number`[] + +defines finger settings. This part may be omitted. + +For the frets and the fingers positions, there must be exactly as many positions as there are strings, +which is 6 by default. For the fingers positions, values corresponding to open or damped strings are ignored. +Finger settings may be numeric (0 .. 9) or uppercase letters (A .. Z). +Note that the values -, x, X, and N are used to designate a string without finger setting. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L45) + +*** + +#### frets + +> **frets**: `Fret`[] + +Defines the string positions. +Strings are enumerated from left (lowest) to right (highest), as they appear in the chord diagrams. +Fret positions are relative to the offset minus one, so with base-fret 1 (the default), +the topmost fret position is 1. With base-fret 3, fret position 1 indicates the 3rd position. +`0` (zero) denotes an open string. Use `-1`, `N` or `x` to denote a non-sounding string. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L34) + +*** + +#### name + +> **name**: `string` + +The chord name, e.g. `C`, `Dm`, `G7`. + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L17) + +### Methods + +#### clone() + +> **clone**(): [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +[`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/chord\_pro/chord\_definition.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/chord_definition.ts#L54) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordLyricsPair + +## Class: ChordLyricsPair + +Represents a chord with the corresponding (partial) lyrics + +### Constructors + +#### new ChordLyricsPair() + +> **new ChordLyricsPair**(`chords`, `lyrics`, `annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Initialises a ChordLyricsPair + +##### Parameters + +• **chords**: `string` = `''` + +The chords + +• **lyrics**: `null` \| `string` = `null` + +The lyrics + +• **annotation**: `null` \| `string` = `null` + +The annotation + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L21) + +### Properties + +#### annotation + +> **annotation**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L13) + +*** + +#### chords + +> **chords**: `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L9) + +*** + +#### lyrics + +> **lyrics**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L11) + +### Methods + +#### changeChord() + +> **changeChord**(`func`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **func** + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L100) + +*** + +#### clone() + +> **clone**(): [`ChordLyricsPair`](#classeschordlyricspairmd) + +Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L56) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L48) + +*** + +#### set() + +> **set**(`__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.annotation?**: `string` + +• **\_\_namedParameters.chords?**: `string` + +• **\_\_namedParameters.lyrics?**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L64) + +*** + +#### setAnnotation() + +> **setAnnotation**(`annotation`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **annotation**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L76) + +*** + +#### setLyrics() + +> **setLyrics**(`lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **lyrics**: `string` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L72) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L60) + +*** + +#### transpose() + +> **transpose**(`delta`, `key`, `__namedParameters`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **delta**: `number` + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.normalizeChordSuffix**: `boolean` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L80) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **modifier**: `Modifier` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/chord\_lyrics\_pair.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_lyrics_pair.ts#L96) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProFormatter + +## Class: ChordProFormatter + +Formats a song into a ChordPro chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordProFormatter() + +> **new ChordProFormatter**(`configuration`?): [`ChordProFormatter`](#classeschordproformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordProFormatter`](#classeschordproformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Methods + +#### format() + +> **format**(`song`): `string` + +Formats a song into a ChordPro chord sheet. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The ChordPro string + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L24) + +*** + +#### formatChordLyricsPair() + +> **formatChordLyricsPair**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:132](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L132) + +*** + +#### formatChordLyricsPairChords() + +> **formatChordLyricsPairChords**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:139](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L139) + +*** + +#### formatChordLyricsPairLyrics() + +> **formatChordLyricsPairLyrics**(`chordLyricsPair`): `string` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:158](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L158) + +*** + +#### formatComment() + +> **formatComment**(`comment`): `string` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:162](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L162) + +*** + +#### formatExpression() + +> **formatExpression**(`expression`): `string` + +##### Parameters + +• **expression**: `Evaluatable` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:112](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L112) + +*** + +#### formatExpressionRange() + +> **formatExpressionRange**(`expressionRange`): `string` + +##### Parameters + +• **expressionRange**: `Evaluatable`[] + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:104](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L104) + +*** + +#### formatItem() + +> **formatItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L38) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L32) + +*** + +#### formatOrEvaluateItem() + +> **formatOrEvaluateItem**(`item`, `metadata`): `string` + +##### Parameters + +• **item**: `Evaluatable` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L62) + +*** + +#### formatTag() + +> **formatTag**(`tag`): `string` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L124) + +*** + +#### formatTernary() + +> **formatTernary**(`ternary`): `string` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L78) + +*** + +#### formatValueTest() + +> **formatValueTest**(`valueTest`): `string` + +##### Parameters + +• **valueTest**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chord\_pro\_formatter.ts:96](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chord_pro_formatter.ts#L96) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordProParser + +## Class: ChordProParser + +Parses a ChordPro chord sheet + +### Constructors + +#### new ChordProParser() + +> **new ChordProParser**(): [`ChordProParser`](#classeschordproparsermd) + +##### Returns + +[`ChordProParser`](#classeschordproparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_pro\_parser.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_pro_parser.ts#L16) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chord\_pro\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_pro_parser.ts#L23) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a ChordPro chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the ChordPro chord sheet + +• **options?**: `ChordProParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chord\_pro\_parser.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_pro_parser.ts#L36) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetParser + +## Class: ChordSheetParser + +Parses a normal chord sheet + +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks +support for many variations. Besides that, some chordpro feature have been ported back +to ChordsOverWordsParser, which adds some interesting functionality. + +### Extended by + +- [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +### Constructors + +#### new ChordSheetParser() + +> **new ChordSheetParser**(`__namedParameters`?, `showDeprecationWarning`?): [`ChordSheetParser`](#classeschordsheetparsermd) + +Instantiate a chord sheet parser +ChordSheetParser is deprecated, please use ChordsOverWordsParser. + +##### Parameters + +• **\_\_namedParameters?** = `{}` + +• **\_\_namedParameters.preserveWhitespace?**: `boolean` = `true` + +• **showDeprecationWarning?**: `boolean` = `true` + +##### Returns + +[`ChordSheetParser`](#classeschordsheetparsermd) + +##### Deprecated + +##### Defined in + +[parser/chord\_sheet\_parser.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L46) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L82) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:84](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L84) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L173) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordSheetSerializer + +## Class: ChordSheetSerializer + +Serializes a song into een plain object, and deserializes the serialized object back into a [Song](#classessongmd) + +### Constructors + +#### new ChordSheetSerializer() + +> **new ChordSheetSerializer**(): [`ChordSheetSerializer`](#classeschordsheetserializermd) + +##### Returns + +[`ChordSheetSerializer`](#classeschordsheetserializermd) + +### Properties + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L40) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Defined in + +[chord\_sheet\_serializer.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L42) + +### Methods + +#### deserialize() + +> **deserialize**(`serializedSong`): [`Song`](#classessongmd) + +Deserializes a song that has been serialized using [serialize](#serialize) + +##### Parameters + +• **serializedSong**: `SerializedSong` + +The serialized song + +##### Returns + +[`Song`](#classessongmd) + +The deserialized song + +##### Defined in + +[chord\_sheet\_serializer.ts:151](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L151) + +*** + +#### parseAstComponent() + +> **parseAstComponent**(`astComponent`): `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Parameters + +• **astComponent**: `SerializedComponent` + +##### Returns + +`null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) \| [`Tag`](#classestagmd) \| [`Comment`](#classescommentmd) \| [`Ternary`](#classesternarymd) \| [`Literal`](#classesliteralmd) \| [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L156) + +*** + +#### parseChordLyricsPair() + +> **parseChordLyricsPair**(`astComponent`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **astComponent**: `SerializedChordLyricsPair` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L201) + +*** + +#### parseChordSheet() + +> **parseChordSheet**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedSong` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:184](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L184) + +*** + +#### parseComment() + +> **parseComment**(`astComponent`): [`Comment`](#classescommentmd) + +##### Parameters + +• **astComponent**: `SerializedComment` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:234](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L234) + +*** + +#### parseExpression() + +> **parseExpression**(`expression`): (`null` \| `AstType`)[] + +##### Parameters + +• **expression**: (`string` \| `SerializedTernary`)[] + +##### Returns + +(`null` \| `AstType`)[] + +##### Defined in + +[chord\_sheet\_serializer.ts:259](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L259) + +*** + +#### parseLine() + +> **parseLine**(`astComponent`): `void` + +##### Parameters + +• **astComponent**: `SerializedLine` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet\_serializer.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L191) + +*** + +#### parseTag() + +> **parseTag**(`astComponent`): [`Tag`](#classestagmd) + +##### Parameters + +• **astComponent**: `SerializedTag` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet\_serializer.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L213) + +*** + +#### parseTernary() + +> **parseTernary**(`astComponent`): [`Ternary`](#classesternarymd) + +##### Parameters + +• **astComponent**: `SerializedTernary` + +##### Returns + +[`Ternary`](#classesternarymd) + +##### Defined in + +[chord\_sheet\_serializer.ts:239](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L239) + +*** + +#### serialize() + +> **serialize**(`song`): `SerializedSong` + +Serializes the chord sheet to a plain object, which can be converted to any format like JSON, XML etc +Can be deserialized using [deserialize](#deserialize) + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +##### Returns + +`SerializedSong` + +object A plain JS object containing all chord sheet data + +##### Defined in + +[chord\_sheet\_serializer.ts:49](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L49) + +*** + +#### serializeChordDefinition() + +> **serializeChordDefinition**(`chordDefinition`): `SerializedChordDefinition` + +##### Parameters + +• **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Returns + +`SerializedChordDefinition` + +##### Defined in + +[chord\_sheet\_serializer.ts:91](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L91) + +*** + +#### serializeChordLyricsPair() + +> **serializeChordLyricsPair**(`chordLyricsPair`): `object` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Returns + +`object` + +###### annotation + +> **annotation**: `null` \| `string` = `chordLyricsPair.annotation` + +###### chord + +> **chord**: `null` = `null` + +###### chords + +> **chords**: `string` = `chordLyricsPair.chords` + +###### lyrics + +> **lyrics**: `null` \| `string` = `chordLyricsPair.lyrics` + +###### type + +> **type**: `string` = `CHORD_LYRICS_PAIR` + +##### Defined in + +[chord\_sheet\_serializer.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L114) + +*** + +#### serializeComment() + +> **serializeComment**(`comment`): `SerializedComment` + +##### Parameters + +• **comment**: [`Comment`](#classescommentmd) + +##### Returns + +`SerializedComment` + +##### Defined in + +[chord\_sheet\_serializer.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L142) + +*** + +#### serializeExpression() + +> **serializeExpression**(`expression`): `SerializedComponent`[] + +##### Parameters + +• **expression**: `AstType`[] + +##### Returns + +`SerializedComponent`[] + +##### Defined in + +[chord\_sheet\_serializer.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L138) + +*** + +#### serializeItem() + +> **serializeItem**(`item`): `SerializedComponent` + +##### Parameters + +• **item**: `AstType` + +##### Returns + +`SerializedComponent` + +##### Defined in + +[chord\_sheet\_serializer.ts:63](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L63) + +*** + +#### serializeLine() + +> **serializeLine**(`line`): `SerializedLine` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`SerializedLine` + +##### Defined in + +[chord\_sheet\_serializer.ts:56](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L56) + +*** + +#### serializeLiteral() + +> **serializeLiteral**(`literal`): `string` + +##### Parameters + +• **literal**: [`Literal`](#classesliteralmd) + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet\_serializer.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L134) + +*** + +#### serializeTag() + +> **serializeTag**(`tag`): `SerializedTag` + +##### Parameters + +• **tag**: [`Tag`](#classestagmd) + +##### Returns + +`SerializedTag` + +##### Defined in + +[chord\_sheet\_serializer.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L100) + +*** + +#### serializeTernary() + +> **serializeTernary**(`ternary`): `object` + +##### Parameters + +• **ternary**: [`Ternary`](#classesternarymd) + +##### Returns + +`object` + +##### Defined in + +[chord\_sheet\_serializer.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet_serializer.ts#L124) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsFormatter + +## Class: ChordsOverWordsFormatter + +Formats a song into a plain text chord sheet + +### Extends + +- [`Formatter`](#classesformattermd) + +### Constructors + +#### new ChordsOverWordsFormatter() + +> **new ChordsOverWordsFormatter**(`configuration`?): [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L18) + +### Methods + +#### chordLyricsPairLength() + +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` + +##### Parameters + +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`number` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:88](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L88) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into a plain text chord sheet + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +the chord sheet + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L25) + +*** + +#### formatHeader() + +> **formatHeader**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L34) + +*** + +#### formatItemBottom() + +> **formatItemBottom**(`item`, `metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L145) + +*** + +#### formatItemTop() + +> **formatItemTop**(`item`, `_metadata`, `line`): `string` + +##### Parameters + +• **item**: `Item` + +• **\_metadata**: [`Metadata`](#classesmetadatamd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:101](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L101) + +*** + +#### formatLine() + +> **formatLine**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L68) + +*** + +#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: `any` + +• **metadata**: `any` + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:126](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L126) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:80](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L80) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:134](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L134) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L55) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L42) + +*** + +#### renderChord() + +> **renderChord**(`item`, `line`): `string` + +##### Parameters + +• **item**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`string` + +##### Defined in + +[formatter/chords\_over\_words\_formatter.ts:114](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/chords_over_words_formatter.ts#L114) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ChordsOverWordsParser + +## Class: ChordsOverWordsParser + +Parses a chords over words sheet into a song + +It support "regular" chord sheets: + + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives: + + {title: Let it be} + {key: C} + Chorus 1: + Am + Let it be + +For convenience, you can leave out the brackets: + + title: Let it be + Chorus 1: + Am + Let it be + +You can even use a markdown style frontmatter separator to separate the header from the song: + + title: Let it be + key: C + --- + Chorus 1: + Am C/G F C + Let it be, let it be, let it be, let it be + C G F C/E Dm C + Whisper words of wisdom, let it be + +`ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated. + +### Constructors + +#### new ChordsOverWordsParser() + +> **new ChordsOverWordsParser**(): [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +##### Returns + +[`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +### Properties + +#### song? + +> `optional` **song**: [`Song`](#classessongmd) + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chords_over_words_parser.ts#L51) + +### Accessors + +#### warnings + +##### Get Signature + +> **get** **warnings**(): `ParserWarning`[] + +All warnings raised during parsing the chord sheet + +###### Member + +###### Returns + +`ParserWarning`[] + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:58](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chords_over_words_parser.ts#L58) + +### Methods + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chords over words sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +the chords over words sheet + +• **options?**: `ChordsOverWordsParserOptions` + +Parser options. + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### See + +https://peggyjs.org/documentation.html#using-the-parser + +##### Defined in + +[parser/chords\_over\_words\_parser.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chords_over_words_parser.ts#L71) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Comment + +## Class: Comment + +Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview + +### Constructors + +#### new Comment() + +> **new Comment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L7) + +### Properties + +#### content + +> **content**: `string` + +##### Defined in + +[chord\_sheet/comment.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L5) + +### Methods + +#### clone() + +> **clone**(): [`Comment`](#classescommentmd) + +Returns a deep copy of the Comment, useful when programmatically transforming a song + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/comment.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L23) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/comment.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L15) + +*** + +#### toString() + +> **toString**(): `string` + +##### Returns + +`string` + +##### Defined in + +[chord\_sheet/comment.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/comment.ts#L27) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Composite + +## Class: Composite + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Composite() + +> **new Composite**(`expressions`, `variable`): [`Composite`](#classescompositemd) + +##### Parameters + +• **expressions**: `Evaluatable`[] + +• **variable**: `null` \| `string` = `null` + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:9](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L9) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### expressions + +> **expressions**: `Evaluatable`[] = `[]` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:5](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L5) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +*** + +#### variable + +> **variable**: `null` \| `string` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L7) + +### Methods + +#### clone() + +> **clone**(): [`Composite`](#classescompositemd) + +##### Returns + +[`Composite`](#classescompositemd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L25) + +*** + +#### evaluate() + +> **evaluate**(`metadata`, `metadataSeparator`): `string` + +##### Parameters + +• **metadata**: [`Metadata`](#classesmetadatamd) + +• **metadataSeparator**: `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L15) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/composite.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/composite.ts#L21) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Formatter + +## Class: Formatter + +Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object + +### Extended by + +- [`ChordProFormatter`](#classeschordproformattermd) +- [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) +- [`HtmlFormatter`](#classeshtmlformattermd) +- [`TextFormatter`](#classestextformattermd) + +### Constructors + +#### new Formatter() + +> **new Formatter**(`configuration`?): [`Formatter`](#classesformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`Formatter`](#classesformattermd) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlDivFormatter + +## Class: HtmlDivFormatter + +Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlDivFormatter() + +> **new HtmlDivFormatter**(`configuration`?): [`HtmlDivFormatter`](#classeshtmldivformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlDivFormatter`](#classeshtmldivformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_div\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_div_formatter.ts#L44) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_div\_formatter.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_div_formatter.ts#L40) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L26) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlFormatter + +## Class: `abstract` HtmlFormatter + +Acts as a base class for HTML formatters + +### Extends + +- [`Formatter`](#classesformattermd) + +### Extended by + +- [`HtmlDivFormatter`](#classeshtmldivformattermd) +- [`HtmlTableFormatter`](#classeshtmltableformattermd) + +### Constructors + +#### new HtmlFormatter() + +> **new HtmlFormatter**(`configuration`?): [`HtmlFormatter`](#classeshtmlformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlFormatter`](#classeshtmlformattermd) + +##### Inherited from + +[`Formatter`](#classesformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`Formatter`](#classesformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** `abstract` **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Defined in + +[formatter/html\_formatter.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L70) + +*** + +#### template + +##### Get Signature + +> **get** `abstract` **template**(): `Template` + +###### Returns + +`Template` + +##### Defined in + +[formatter/html\_formatter.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L72) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L26) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / HtmlTableFormatter + +## Class: HtmlTableFormatter + +Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like +PDF conversion. + +### Extends + +- [`HtmlFormatter`](#classeshtmlformattermd) + +### Constructors + +#### new HtmlTableFormatter() + +> **new HtmlTableFormatter**(`configuration`?): [`HtmlTableFormatter`](#classeshtmltableformattermd) + +Instantiate + +##### Parameters + +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` + +options + +##### Returns + +[`HtmlTableFormatter`](#classeshtmltableformattermd) + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`constructor`](#constructors) + +##### Defined in + +[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) + +### Properties + +#### configuration + +> **configuration**: `Configuration` + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`configuration`](#configuration) + +##### Defined in + +[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) + +### Accessors + +#### cssObject + +##### Get Signature + +> **get** **cssObject**(): `CSS` + +Basic CSS, in object style à la useStyles, to use with the HTML output +For a CSS string see [cssString](#cssstring) + +Example: + + '.paragraph': { + marginBottom: '1em' + } + +###### Returns + +`CSS` + +the CSS object + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssObject`](#cssobject) + +##### Defined in + +[formatter/html\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L66) + +*** + +#### defaultCss + +##### Get Signature + +> **get** **defaultCss**(): `CSS` + +###### Returns + +`CSS` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`defaultCss`](#defaultcss) + +##### Defined in + +[formatter/html\_table\_formatter.ts:45](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_table_formatter.ts#L45) + +*** + +#### template + +##### Get Signature + +> **get** **template**(): `Template` + +###### Returns + +`Template` + +##### Overrides + +[`HtmlFormatter`](#classeshtmlformattermd).[`template`](#template) + +##### Defined in + +[formatter/html\_table\_formatter.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_table_formatter.ts#L41) + +### Methods + +#### cssString() + +> **cssString**(`scope`): `string` + +Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output + +For example, execute cssString('.chordSheetViewer') will result in CSS like: + + .chordSheetViewer .paragraph { + margin-bottom: 1em; + } + +##### Parameters + +• **scope**: `string` = `''` + +the CSS scope to use, for example `.chordSheetViewer` + +##### Returns + +`string` + +the CSS string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`cssString`](#cssstring) + +##### Defined in + +[formatter/html\_formatter.ts:50](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L50) + +*** + +#### format() + +> **format**(`song`): `string` + +Formats a song into HTML. + +##### Parameters + +• **song**: [`Song`](#classessongmd) + +The song to be formatted + +##### Returns + +`string` + +The HTML string + +##### Inherited from + +[`HtmlFormatter`](#classeshtmlformattermd).[`format`](#format) + +##### Defined in + +[formatter/html\_formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/html_formatter.ts#L26) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Key + +## Class: Key + +Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral). + +The only function considered public API is `Key.distance` + +### Implements + +- `KeyProperties` + +### Constructors + +#### new Key() + +> **new Key**(`__namedParameters`): [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.grade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.minor**: `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +• **\_\_namedParameters.number?**: `null` \| `number` = `null` + +• **\_\_namedParameters.originalKeyString?**: `null` \| `string` = `null` + +• **\_\_namedParameters.preferredModifier**: `null` \| `Modifier` = `null` + +• **\_\_namedParameters.referenceKeyGrade?**: `null` \| `number` = `null` + +• **\_\_namedParameters.type**: `ChordType` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:249](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L249) + +### Properties + +#### grade + +> **grade**: `null` \| `number` + +##### Implementation of + +`KeyProperties.grade` + +##### Defined in + +[key.ts:51](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L51) + +*** + +#### minor + +> **minor**: `boolean` = `false` + +##### Implementation of + +`KeyProperties.minor` + +##### Defined in + +[key.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L70) + +*** + +#### modifier + +> **modifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.modifier` + +##### Defined in + +[key.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L55) + +*** + +#### number + +> **number**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.number` + +##### Defined in + +[key.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L53) + +*** + +#### originalKeyString + +> **originalKeyString**: `null` \| `string` = `null` + +##### Defined in + +[key.ts:74](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L74) + +*** + +#### preferredModifier + +> **preferredModifier**: `null` \| `Modifier` + +##### Implementation of + +`KeyProperties.preferredModifier` + +##### Defined in + +[key.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L76) + +*** + +#### referenceKeyGrade + +> **referenceKeyGrade**: `null` \| `number` = `null` + +##### Implementation of + +`KeyProperties.referenceKeyGrade` + +##### Defined in + +[key.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L72) + +*** + +#### type + +> **type**: `ChordType` + +##### Implementation of + +`KeyProperties.type` + +##### Defined in + +[key.ts:57](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L57) + +### Accessors + +#### effectiveGrade + +##### Get Signature + +> **get** **effectiveGrade**(): `number` + +###### Returns + +`number` + +##### Defined in + +[key.ts:285](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L285) + +*** + +#### minorSign + +##### Get Signature + +> **get** **minorSign**(): `""` \| `"m"` + +###### Returns + +`""` \| `"m"` + +##### Defined in + +[key.ts:519](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L519) + +*** + +#### note + +##### Get Signature + +> **get** **note**(): `string` + +###### Returns + +`string` + +##### Defined in + +[key.ts:490](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L490) + +*** + +#### relativeMajor + +##### Get Signature + +> **get** **relativeMajor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:301](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L301) + +*** + +#### relativeMinor + +##### Get Signature + +> **get** **relativeMinor**(): [`Key`](#classeskeymd) + +###### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:305](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L305) + +*** + +#### unicodeModifier + +##### Get Signature + +> **get** **unicodeModifier**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Defined in + +[key.ts:59](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L59) + +### Methods + +#### canBeFlat() + +> **canBeFlat**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:595](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L595) + +*** + +#### canBeSharp() + +> **canBeSharp**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:603](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L603) + +*** + +#### changeGrade() + +> **changeGrade**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `any` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:558](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L558) + +*** + +#### clone() + +> **clone**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:317](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L317) + +*** + +#### distanceTo() + +> **distanceTo**(`otherKey`): `number` + +##### Parameters + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`number` + +##### Defined in + +[key.ts:280](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L280) + +*** + +#### equals() + +> **equals**(`otherKey`): `boolean` + +##### Parameters + +• **otherKey**: [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L410) + +*** + +#### is() + +> **is**(`type`): `boolean` + +##### Parameters + +• **type**: `ChordType` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:390](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L390) + +*** + +#### isChordSolfege() + +> **isChordSolfege**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L402) + +*** + +#### isChordSymbol() + +> **isChordSymbol**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L398) + +*** + +#### isMinor() + +> **isMinor**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:293](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L293) + +*** + +#### isNumeral() + +> **isNumeral**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L406) + +*** + +#### isNumeric() + +> **isNumeric**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:394](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L394) + +*** + +#### makeMinor() + +> **makeMinor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:297](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L297) + +*** + +#### normalize() + +> **normalize**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:630](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L630) + +*** + +#### normalizeEnharmonics() + +> **normalizeEnharmonics**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:644](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L644) + +*** + +#### setGrade() + +> **setGrade**(`newGrade`): [`Key`](#classeskeymd) + +##### Parameters + +• **newGrade**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:611](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L611) + +*** + +#### toChordSolfege() + +> **toChordSolfege**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:362](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L362) + +*** + +#### toChordSolfegeString() + +> **toChordSolfegeString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:386](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L386) + +*** + +#### toChordSymbol() + +> **toChordSymbol**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:342](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L342) + +*** + +#### toChordSymbolString() + +> **toChordSymbolString**(`key`): `string` + +##### Parameters + +• **key**: [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:382](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L382) + +*** + +#### toMajor() + +> **toMajor**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:309](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L309) + +*** + +#### toNumeral() + +> **toNumeral**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:456](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L456) + +*** + +#### toNumeralString() + +> **toNumeralString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:476](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L476) + +*** + +#### toNumeric() + +> **toNumeric**(`key`): [`Key`](#classeskeymd) + +##### Parameters + +• **key**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:431](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L431) + +*** + +#### toNumericString() + +> **toNumericString**(`key`): `string` + +##### Parameters + +• **key**: `null` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +`string` + +##### Defined in + +[key.ts:452](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L452) + +*** + +#### toString() + +> **toString**(`__namedParameters`): `string` + +Returns a string representation of an object. + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.showMinor**: `undefined` \| `boolean` = `true` + +• **\_\_namedParameters.useUnicodeModifier**: `undefined` \| `boolean` = `false` + +##### Returns + +`string` + +##### Defined in + +[key.ts:480](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L480) + +*** + +#### transpose() + +> **transpose**(`delta`): [`Key`](#classeskeymd) + +##### Parameters + +• **delta**: `number` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:544](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L544) + +*** + +#### transposeDown() + +> **transposeDown**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:582](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L582) + +*** + +#### transposeUp() + +> **transposeUp**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:568](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L568) + +*** + +#### useModifier() + +> **useModifier**(`newModifier`): [`Key`](#classeskeymd) + +##### Parameters + +• **newModifier**: `null` \| `Modifier` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:625](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L625) + +*** + +#### distance() + +> `static` **distance**(`oneKey`, `otherKey`): `number` + +Calculates the distance in semitones between one key and another. + +##### Parameters + +• **oneKey**: `string` \| [`Key`](#classeskeymd) + +the key + +• **otherKey**: `string` \| [`Key`](#classeskeymd) + +the other key + +##### Returns + +`number` + +the distance in semitones + +##### Defined in + +[key.ts:245](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L245) + +*** + +#### equals() + +> `static` **equals**(`oneKey`, `otherKey`): `boolean` + +##### Parameters + +• **oneKey**: `null` \| [`Key`](#classeskeymd) + +• **otherKey**: `null` \| [`Key`](#classeskeymd) + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:419](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L419) + +*** + +#### getNumberFromKey() + +> `static` **getNumberFromKey**(`keyString`, `keyType`): `number` + +##### Parameters + +• **keyString**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`number` + +##### Defined in + +[key.ts:152](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L152) + +*** + +#### isMinor() + +> `static` **isMinor**(`key`, `keyType`, `minor`): `boolean` + +##### Parameters + +• **key**: `string` + +• **keyType**: `ChordType` + +• **minor**: `undefined` \| `string` \| `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[key.ts:193](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L193) + +*** + +#### keyWithModifier() + +> `static` **keyWithModifier**(`key`, `modifier`, `type`): `string` + +##### Parameters + +• **key**: `string` + +• **modifier**: `null` \| `Modifier` + +• **type**: `ChordType` + +##### Returns + +`string` + +##### Defined in + +[key.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L161) + +*** + +#### parse() + +> `static` **parse**(`keyString`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L78) + +*** + +#### parseAsType() + +> `static` **parseAsType**(`trimmed`, `keyType`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **trimmed**: `string` + +• **keyType**: `ChordType` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:93](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L93) + +*** + +#### parseOrFail() + +> `static` **parseOrFail**(`keyString`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyString**: `null` \| `string` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:209](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L209) + +*** + +#### resolve() + +> `static` **resolve**(`__namedParameters`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **\_\_namedParameters** + +• **\_\_namedParameters.key**: `string` \| `number` + +• **\_\_namedParameters.keyType**: `ChordType` + +• **\_\_namedParameters.minor**: `string` \| `boolean` + +• **\_\_namedParameters.modifier**: `null` \| `Modifier` + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:108](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L108) + +*** + +#### shiftGrade() + +> `static` **shiftGrade**(`grade`): `any` + +##### Parameters + +• **grade**: `number` + +##### Returns + +`any` + +##### Defined in + +[key.ts:617](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L617) + +*** + +#### toGrade() + +> `static` **toGrade**(`key`, `modifier`, `type`, `isMinor`): `null` \| `number` + +##### Parameters + +• **key**: `string` + +• **modifier**: `ModifierMaybe` + +• **type**: `ChordType` + +• **isMinor**: `boolean` + +##### Returns + +`null` \| `number` + +##### Defined in + +[key.ts:176](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L176) + +*** + +#### toString() + +> `static` **toString**(`keyStringOrObject`): `string` + +##### Parameters + +• **keyStringOrObject**: `string` \| [`Key`](#classeskeymd) + +##### Returns + +`string` + +##### Defined in + +[key.ts:235](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L235) + +*** + +#### wrap() + +> `static` **wrap**(`keyStringOrObject`): `null` \| [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) + +##### Returns + +`null` \| [`Key`](#classeskeymd) + +##### Defined in + +[key.ts:217](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L217) + +*** + +#### wrapOrFail() + +> `static` **wrapOrFail**(`keyStringOrObject`): [`Key`](#classeskeymd) + +##### Parameters + +• **keyStringOrObject**: `null` \| `string` \| [`Key`](#classeskeymd) = `null` + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[key.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/key.ts#L225) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Line + +## Class: Line + +Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag + +### Constructors + +#### new Line() + +> **new Line**(`__namedParameters`): [`Line`](#classeslinemd) + +##### Parameters + +• **\_\_namedParameters** = `...` + +• **\_\_namedParameters.items**: `Item`[] + +• **\_\_namedParameters.type**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L62) + +### Properties + +#### chordFont + +> **chordFont**: `Font` + +The chord font that applies to this line. Is derived from the directives: +`chordfont`, `chordsize` and `chordcolour` +See: https://www.chordpro.org/chordpro/directives-props_chord_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L60) + +*** + +#### currentChordLyricsPair + +> **currentChordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L38) + +*** + +#### items + +> **items**: `Item`[] = `[]` + +The items ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd) or [Comment](#classescommentmd)) of which the line consists + +##### Defined in + +[chord\_sheet/line.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L29) + +*** + +#### key + +> **key**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L40) + +*** + +#### lineNumber + +> **lineNumber**: `null` \| `number` = `null` + +##### Defined in + +[chord\_sheet/line.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L44) + +*** + +#### textFont + +> **textFont**: `Font` + +The text font that applies to this line. Is derived from the directives: +`textfont`, `textsize` and `textcolour` +See: https://www.chordpro.org/chordpro/directives-props_text_legacy/ + +##### Defined in + +[chord\_sheet/line.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L52) + +*** + +#### transposeKey + +> **transposeKey**: `null` \| `string` = `null` + +##### Defined in + +[chord\_sheet/line.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L42) + +*** + +#### type + +> **type**: `LineType` = `NONE` + +The line type, This is set by the ChordProParser when it read tags like {start_of_chorus} or {start_of_verse} +Values can be [VERSE](#variablesversemd), [CHORUS](#variableschorusmd) or [NONE](#variablesnonemd) + +##### Defined in + +[chord\_sheet/line.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L36) + +### Accessors + +#### \_tag + +##### Get Signature + +> **get** **\_tag**(): `null` \| [`Tag`](#classestagmd) + +###### Returns + +`null` \| [`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:223](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L223) + +### Methods + +#### addChordLyricsPair() + +> **addChordLyricsPair**(`chords`, `lyrics`): [`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Parameters + +• **chords**: `null` \| `string` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +• **lyrics**: `null` = `null` + +##### Returns + +[`ChordLyricsPair`](#classeschordlyricspairmd) + +##### Defined in + +[chord\_sheet/line.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L174) + +*** + +#### addComment() + +> **addComment**(`content`): [`Comment`](#classescommentmd) + +##### Parameters + +• **content**: `string` \| [`Comment`](#classescommentmd) + +##### Returns + +[`Comment`](#classescommentmd) + +##### Defined in + +[chord\_sheet/line.ts:207](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L207) + +*** + +#### addItem() + +> **addItem**(`item`): `void` + +Adds an item ([ChordLyricsPair](#classeschordlyricspairmd) or [Tag](#classestagmd)) to the line + +##### Parameters + +• **item**: `Item` + +The item to be added + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:83](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L83) + +*** + +#### addTag() + +> **addTag**(`nameOrTag`, `value`): [`Tag`](#classestagmd) + +##### Parameters + +• **nameOrTag**: `string` \| [`Tag`](#classestagmd) + +• **value**: `null` \| `string` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Defined in + +[chord\_sheet/line.ts:201](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L201) + +*** + +#### chords() + +> **chords**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:191](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L191) + +*** + +#### clone() + +> **clone**(): [`Line`](#classeslinemd) + +Returns a deep copy of the line and all of its items + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L107) + +*** + +#### ensureChordLyricsPair() + +> **ensureChordLyricsPair**(): `void` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:185](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L185) + +*** + +#### ~~hasContent()~~ + +> **hasContent**(): `boolean` + +Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](#hasrenderableitems) + +##### Returns + +`boolean` + +##### Deprecated + +##### Defined in + +[chord\_sheet/line.ts:170](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L170) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the line contains items that are renderable + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:99](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L99) + +*** + +#### isBridge() + +> **isBridge**(): `boolean` + +Indicates whether the line type is BRIDGE + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L129) + +*** + +#### isChorus() + +> **isChorus**(): `boolean` + +Indicates whether the line type is [CHORUS](#variableschorusmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:137](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L137) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +Indicates whether the line contains any items + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:71](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L71) + +*** + +#### isGrid() + +> **isGrid**(): `boolean` + +Indicates whether the line type is GRID + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:145](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L145) + +*** + +#### isNotEmpty() + +> **isNotEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L75) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:241](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L241) + +*** + +#### isSectionStart() + +> **isSectionStart**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:237](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L237) + +*** + +#### isTab() + +> **isTab**(): `boolean` + +Indicates whether the line type is [TAB](#variablestabmd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:153](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L153) + +*** + +#### isVerse() + +> **isVerse**(): `boolean` + +Indicates whether the line type is [VERSE](#variablesversemd) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/line.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L161) + +*** + +#### lyrics() + +> **lyrics**(`chr`): `void` + +##### Parameters + +• **chr**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/line.ts:196](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L196) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Line`](#classeslinemd) + +##### Parameters + +• **func**: `null` \| `MapItemFunc` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:111](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L111) + +*** + +#### set() + +> **set**(`properties`): [`Line`](#classeslinemd) + +##### Parameters + +• **properties** + +• **properties.items?**: `Item`[] + +• **properties.type?**: `LineType` + +##### Returns + +[`Line`](#classeslinemd) + +##### Defined in + +[chord\_sheet/line.ts:213](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/line.ts#L213) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Literal + +## Class: Literal + +### Extends + +- `Evaluatable` + +### Constructors + +#### new Literal() + +> **new Literal**(`string`): [`Literal`](#classesliteralmd) + +##### Parameters + +• **string**: `string` + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.constructor` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L6) + +### Properties + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`Evaluatable.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +*** + +#### string + +> **string**: `string` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L4) + +### Methods + +#### clone() + +> **clone**(): [`Literal`](#classesliteralmd) + +##### Returns + +[`Literal`](#classesliteralmd) + +##### Overrides + +`Evaluatable.clone` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:19](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L19) + +*** + +#### evaluate() + +> **evaluate**(): `string` + +##### Returns + +`string` + +##### Overrides + +`Evaluatable.evaluate` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:11](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L11) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/chord\_pro/literal.ts:15](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/literal.ts#L15) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Metadata + +## Class: Metadata + +Stores song metadata. Properties can be accessed using the get() method: + +const metadata = new Metadata({ author: 'John' }); +metadata.get('author') // => 'John' + +See [Metadata#get](#get) + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Metadata() + +> **new Metadata**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/metadata.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L28) + +### Properties + +#### metadata + +> **metadata**: `Record`\<`string`, `string` \| `string`[]\> = `{}` + +##### Defined in + +[chord\_sheet/metadata.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L26) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### add() + +> **add**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L46) + +*** + +#### calculateKeyFromCapo() + +> **calculateKeyFromCapo**(): `null` \| `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:178](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L178) + +*** + +#### clone() + +> **clone**(): [`Metadata`](#classesmetadatamd) + +Returns a deep clone of this Metadata object + +##### Returns + +[`Metadata`](#classesmetadatamd) + +the cloned Metadata object + +##### Defined in + +[chord\_sheet/metadata.ts:174](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L174) + +*** + +#### contains() + +> **contains**(`key`): `boolean` + +##### Parameters + +• **key**: `string` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/metadata.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L42) + +*** + +#### get() + +> **get**(`prop`): `null` \| `string` \| `string`[] + +Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values. + +This method deprecates direct property access, eg: metadata['author'] + +Examples: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('lyricist') // => 'Pete' +metadata.get('author') // => ['John', 'Mary'] +metadata.get('author.1') // => 'John' +metadata.get('author.2') // => 'Mary' + +Using a negative index will start counting at the end of the list: + +const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); +metadata.get('author.-1') // => 'Mary' +metadata.get('author.-2') // => 'John' + +##### Parameters + +• **prop**: `string` + +the property name + +##### Returns + +`null` \| `string` \| `string`[] + +the metadata value(s). If there is only one value, it will return a String, +else it returns an array of strings. + +##### Defined in + +[chord\_sheet/metadata.ts:109](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L109) + +*** + +#### getArrayItem() + +> **getArrayItem**(`prop`): `null` \| `string` + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/metadata.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L150) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L78) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/metadata.ts:82](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L82) + +*** + +#### merge() + +> **merge**(`metadata`): [`Metadata`](#classesmetadatamd) + +##### Parameters + +• **metadata**: `Record`\<`string`, `string` \| `string`[]\> + +##### Returns + +[`Metadata`](#classesmetadatamd) + +##### Defined in + +[chord\_sheet/metadata.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L36) + +*** + +#### parseArrayKey() + +> **parseArrayKey**(`prop`): `null` \| [`string`, `number`] + +##### Parameters + +• **prop**: `string` + +##### Returns + +`null` \| [`string`, `number`] + +##### Defined in + +[chord\_sheet/metadata.ts:138](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L138) + +*** + +#### set() + +> **set**(`key`, `value`): `void` + +##### Parameters + +• **key**: `string` + +• **value**: `null` \| `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/metadata.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata.ts#L70) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Paragraph + +## Class: Paragraph + +Represents a paragraph of lines in a chord sheet + +### Constructors + +#### new Paragraph() + +> **new Paragraph**(): [`Paragraph`](#classesparagraphmd) + +##### Returns + +[`Paragraph`](#classesparagraphmd) + +### Properties + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the paragraph consists + +##### Member + +##### Defined in + +[chord\_sheet/paragraph.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L16) + +### Accessors + +#### contents + +##### Get Signature + +> **get** **contents**(): `string` + +Returns the paragraph contents as one string where lines are separated by newlines + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/paragraph.ts:52](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L52) + +*** + +#### label + +##### Get Signature + +> **get** **label**(): `null` \| `string` + +Returns the label of the paragraph. The label is the value of the first section delimiter tag +in the first line. + +###### Returns + +`null` \| `string` + +##### Defined in + +[chord\_sheet/paragraph.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L68) + +*** + +#### type + +##### Get Signature + +> **get** **type**(): `LineType` + +Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. +If not, it returns [INDETERMINATE](#variablesindeterminatemd) + +###### Returns + +`LineType` + +##### Defined in + +[chord\_sheet/paragraph.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L87) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/paragraph.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L18) + +*** + +#### hasRenderableItems() + +> **hasRenderableItems**(): `boolean` + +Indicates whether the paragraph contains lines with renderable items. + +##### Returns + +`boolean` + +##### See + +[Line.hasRenderableItems](#hasrenderableitems) + +##### Defined in + +[chord\_sheet/paragraph.ts:103](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L103) + +*** + +#### isEmpty() + +> **isEmpty**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/paragraph.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L107) + +*** + +#### isLiteral() + +> **isLiteral**(): `boolean` + +Indicates whether the paragraph only contains literals. If true, [contents](#contents) can be used to retrieve +the paragraph contents as one string where lines are separated by newlines. + +##### Returns + +`boolean` + +##### See + +[contents](#contents) + +##### Defined in + +[chord\_sheet/paragraph.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/paragraph.ts#L28) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SoftLineBreak + +## Class: SoftLineBreak + +### Constructors + +#### new SoftLineBreak() + +> **new SoftLineBreak**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +### Methods + +#### clone() + +> **clone**(): [`SoftLineBreak`](#classessoftlinebreakmd) + +##### Returns + +[`SoftLineBreak`](#classessoftlinebreakmd) + +##### Defined in + +[chord\_sheet/soft\_line\_break.ts:2](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/soft_line_break.ts#L2) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Song + +## Class: Song + +Represents a song in a chord sheet. Currently a chord sheet can only have one song. + +### Extends + +- `MetadataAccessors` + +### Constructors + +#### new Song() + +> **new Song**(`metadata`): [`Song`](#classessongmd) + +Creates a new {Song} instance + +##### Parameters + +• **metadata** = `{}` + +{Object|Metadata} predefined metadata + +##### Returns + +[`Song`](#classessongmd) + +##### Overrides + +`MetadataAccessors.constructor` + +##### Defined in + +[chord\_sheet/song.ts:54](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L54) + +### Properties + +#### \_bodyLines + +> **\_bodyLines**: `null` \| [`Line`](#classeslinemd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L44) + +*** + +#### \_bodyParagraphs + +> **\_bodyParagraphs**: `null` \| [`Paragraph`](#classesparagraphmd)[] = `null` + +##### Defined in + +[chord\_sheet/song.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L46) + +*** + +#### lines + +> **lines**: [`Line`](#classeslinemd)[] = `[]` + +The [Line](#classeslinemd) items of which the song consists + +##### Member + +##### Defined in + +[chord\_sheet/song.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L35) + +*** + +#### metadata + +> **metadata**: [`Metadata`](#classesmetadatamd) + +The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is +an array containing all unique values for the entry. + +##### Defined in + +[chord\_sheet/song.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L42) + +*** + +#### warnings + +> **warnings**: `ParserWarning`[] = `[]` + +##### Defined in + +[chord\_sheet/song.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L48) + +### Accessors + +#### album + +##### Get Signature + +> **get** **album**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.album` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L38) + +*** + +#### artist + +##### Get Signature + +> **get** **artist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.artist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L44) + +*** + +#### bodyLines + +##### Get Signature + +> **get** **bodyLines**(): [`Line`](#classeslinemd)[] + +Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful +if you want to skip the "header lines": the lines that only contain meta data. + +###### Returns + +[`Line`](#classeslinemd)[] + +The song body lines + +##### Defined in + +[chord\_sheet/song.ts:64](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L64) + +*** + +#### bodyParagraphs + +##### Get Signature + +> **get** **bodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +Returns the song paragraphs, skipping the paragraphs that only contain empty lines +(empty as in not rendering any content) + +###### See + +[bodyLines](#bodylines) + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L78) + +*** + +#### capo + +##### Get Signature + +> **get** **capo**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.capo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:28](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L28) + +*** + +#### composer + +##### Get Signature + +> **get** **composer**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.composer` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:46](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L46) + +*** + +#### copyright + +##### Get Signature + +> **get** **copyright**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.copyright` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:40](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L40) + +*** + +#### duration + +##### Get Signature + +> **get** **duration**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.duration` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:30](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L30) + +*** + +#### expandedBodyParagraphs + +##### Get Signature + +> **get** **expandedBodyParagraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The body paragraphs of the song, with any `{chorus}` tag expanded into the targeted chorus + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:156](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L156) + +*** + +#### key + +##### Get Signature + +> **get** **key**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.key` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L22) + +*** + +#### lyricist + +##### Get Signature + +> **get** **lyricist**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.lyricist` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L42) + +*** + +#### paragraphs + +##### Get Signature + +> **get** **paragraphs**(): [`Paragraph`](#classesparagraphmd)[] + +The [Paragraph](#classesparagraphmd) items of which the song consists + +###### Member + +###### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:148](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L148) + +*** + +#### subtitle + +##### Get Signature + +> **get** **subtitle**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.subtitle` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L26) + +*** + +#### tempo + +##### Get Signature + +> **get** **tempo**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.tempo` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:32](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L32) + +*** + +#### time + +##### Get Signature + +> **get** **time**(): `null` \| `string` \| `string`[] + +###### Returns + +`null` \| `string` \| `string`[] + +##### Inherited from + +`MetadataAccessors.time` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L34) + +*** + +#### title + +##### Get Signature + +> **get** **title**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.title` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L24) + +*** + +#### year + +##### Get Signature + +> **get** **year**(): `null` \| `string` + +###### Returns + +`null` \| `string` + +##### Inherited from + +`MetadataAccessors.year` + +##### Defined in + +[chord\_sheet/metadata\_accessors.ts:36](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/metadata_accessors.ts#L36) + +### Methods + +#### addLine() + +> **addLine**(`line`): `void` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:380](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L380) + +*** + +#### changeKey() + +> **changeKey**(`newKey`): [`Song`](#classessongmd) + +Returns a copy of the song with the key set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive +- all chords, those are transposed according to the distance between the current and the new key + +##### Parameters + +• **newKey**: `string` \| [`Key`](#classeskeymd) + +The new key. + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:304](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L304) + +*** + +#### changeMetadata() + +> **changeMetadata**(`name`, `value`): [`Song`](#classessongmd) + +Returns a copy of the song with the directive value set to the specified value. +- when there is a matching directive in the song, it will update the directive +- when there is no matching directive, it will be inserted +If `value` is `null` it will act as a delete, any directive matching `name` will be removed. + +##### Parameters + +• **name**: `string` + +The directive name + +• **value**: `null` \| `string` + +The value to set, or `null` to remove the directive + +##### Returns + +[`Song`](#classessongmd) + +##### Defined in + +[chord\_sheet/song.ts:357](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L357) + +*** + +#### clone() + +> **clone**(): [`Song`](#classessongmd) + +Returns a deep clone of the song + +##### Returns + +[`Song`](#classessongmd) + +The cloned song + +##### Defined in + +[chord\_sheet/song.ts:186](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L186) + +*** + +#### foreachItem() + +> **foreachItem**(`func`): `void` + +##### Parameters + +• **func**: `EachItemCallback` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:417](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L417) + +*** + +#### getChordDefinitions() + +> **getChordDefinitions**(): `Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +Returns all chord definitions from the song. +Definitions are made using the `{chord}` or `{define}` directive. +A chord definitions overrides a previous chord definition for the exact same chord. + +##### Returns + +`Record`\<`string`, [`ChordDefinition`](#classeschorddefinitionmd)\> + +the chord definitions + +##### See + + - https://chordpro.org/chordpro/directives-define/ + - https://chordpro.org/chordpro/directives-chord/ + +##### Defined in + +[chord\_sheet/song.ts:453](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L453) + +*** + +#### getChords() + +> **getChords**(): `string`[] + +Returns all unique chords used in the song + +##### Returns + +`string`[] + +the chords + +##### Defined in + +[chord\_sheet/song.ts:427](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L427) + +*** + +#### getMetadata() + +> **getMetadata**(`name`): `null` \| `string` \| `string`[] + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` \| `string`[] + +##### Overrides + +`MetadataAccessors.getMetadata` + +##### Defined in + +[chord\_sheet/song.ts:194](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L194) + +*** + +#### getSingleMetadata() + +> **getSingleMetadata**(`name`): `null` \| `string` + +##### Parameters + +• **name**: `string` + +##### Returns + +`null` \| `string` + +##### Overrides + +`MetadataAccessors.getSingleMetadata` + +##### Defined in + +[chord\_sheet/song.ts:198](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L198) + +*** + +#### linesToParagraphs() + +> **linesToParagraphs**(`lines`): [`Paragraph`](#classesparagraphmd)[] + +##### Parameters + +• **lines**: [`Line`](#classeslinemd)[] + +##### Returns + +[`Paragraph`](#classesparagraphmd)[] + +##### Defined in + +[chord\_sheet/song.ts:164](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L164) + +*** + +#### mapItems() + +> **mapItems**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new Item to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapItemsCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// transpose all chords: +song.mapItems((item) => { + if (item instanceof ChordLyricsPair) { + return item.transpose(2, 'D'); + } + + return item; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:398](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L398) + +*** + +#### mapLines() + +> **mapLines**(`func`): [`Song`](#classessongmd) + +Change the song contents inline. Return a new [Line](#classeslinemd) to replace it. Return `null` to remove it. + +##### Parameters + +• **func**: `MapLinesCallback` + +the callback function + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Example + +```ts +// remove lines with only Tags: +song.mapLines((line) => { + if (line.items.every(item => item instanceof Tag)) { + return null; + } + + return line; +}); +``` + +##### Defined in + +[chord\_sheet/song.ts:485](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L485) + +*** + +#### requireCurrentKey() + +> **requireCurrentKey**(): [`Key`](#classeskeymd) + +##### Returns + +[`Key`](#classeskeymd) + +##### Defined in + +[chord\_sheet/song.ts:332](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L332) + +*** + +#### selectRenderableItems() + +> **selectRenderableItems**(`items`): ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Parameters + +• **items**: ([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Returns + +([`Line`](#classeslinemd) \| [`Paragraph`](#classesparagraphmd))[] + +##### Defined in + +[chord\_sheet/song.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L86) + +*** + +#### setCapo() + +> **setCapo**(`capo`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified capo. It changes: +- the value for `capo` in the [metadata](#metadata) set +- any existing `capo` directive + +##### Parameters + +• **capo**: `null` \| `number` + +the capo. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `capo` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:225](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L225) + +*** + +#### setKey() + +> **setKey**(`key`): [`Song`](#classessongmd) + +Returns a copy of the song with the key value set to the specified key. It changes: +- the value for `key` in the [metadata](#metadata) set +- any existing `key` directive + +##### Parameters + +• **key**: `null` \| `string` \| `number` + +the key. Passing `null` will: +- remove the current key from [metadata](#metadata) +- remove any `key` directive + +##### Returns + +[`Song`](#classessongmd) + +The changed song + +##### Defined in + +[chord\_sheet/song.ts:211](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L211) + +*** + +#### setMetadata() + +> **setMetadata**(`name`, `value`): `void` + +##### Parameters + +• **name**: `string` + +• **value**: `string` + +##### Returns + +`void` + +##### Defined in + +[chord\_sheet/song.ts:190](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L190) + +*** + +#### transpose() + +> **transpose**(`delta`, `options`?): [`Song`](#classessongmd) + +Transposes the song by the specified delta. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **delta**: `number` + +The number of semitones (positive or negative) to transpose with + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:252](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L252) + +*** + +#### transposeDown() + +> **transposeDown**(`options`?): [`Song`](#classessongmd) + +Transposes the song down by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:292](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L292) + +*** + +#### transposeUp() + +> **transposeUp**(`options`?): [`Song`](#classessongmd) + +Transposes the song up by one semitone. It will: +- transpose all chords, see: [Chord#transpose](#transpose) +- transpose the song key in [metadata](#metadata) +- update any existing `key` directive + +##### Parameters + +• **options?** = `{}` + +options + +• **options.normalizeChordSuffix?**: `undefined` \| `boolean` = `false` + +whether to normalize the chord suffixes after transposing + +##### Returns + +[`Song`](#classessongmd) + +The transposed song + +##### Defined in + +[chord\_sheet/song.ts:279](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L279) + +*** + +#### useModifier() + +> **useModifier**(`modifier`): [`Song`](#classessongmd) + +Returns a copy of the song with all chords changed to the specified modifier. + +##### Parameters + +• **modifier**: `Modifier` + +the new modifier + +##### Returns + +[`Song`](#classessongmd) + +the changed song + +##### Defined in + +[chord\_sheet/song.ts:322](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/song.ts#L322) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / Tag + +## Class: Tag + +Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/ + +### Extends + +- `AstComponent` + +### Constructors + +#### new Tag() + +> **new Tag**(`name`, `value`, `traceInfo`): [`Tag`](#classestagmd) + +##### Parameters + +• **name**: `string` + +• **value**: `null` \| `string` = `null` + +• **traceInfo**: `null` \| `TraceInfo` = `null` + +##### Returns + +[`Tag`](#classestagmd) + +##### Overrides + +`AstComponent.constructor` + +##### Defined in + +[chord\_sheet/tag.ts:412](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L412) + +### Properties + +#### \_isMetaTag + +> **\_isMetaTag**: `boolean` = `false` + +##### Defined in + +[chord\_sheet/tag.ts:402](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L402) + +*** + +#### \_name + +> **\_name**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:406](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L406) + +*** + +#### \_originalName + +> **\_originalName**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:404](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L404) + +*** + +#### \_value + +> **\_value**: `string` = `''` + +##### Defined in + +[chord\_sheet/tag.ts:408](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L408) + +*** + +#### chordDefinition? + +> `optional` **chordDefinition**: [`ChordDefinition`](#classeschorddefinitionmd) + +##### Defined in + +[chord\_sheet/tag.ts:410](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L410) + +*** + +#### column + +> **column**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.column` + +##### Defined in + +[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) + +*** + +#### line + +> **line**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.line` + +##### Defined in + +[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) + +*** + +#### offset + +> **offset**: `null` \| `number` = `null` + +##### Inherited from + +`AstComponent.offset` + +##### Defined in + +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) + +### Accessors + +#### name + +##### Get Signature + +> **get** **name**(): `string` + +The tag full name. When the original tag used the short name, `name` will return the full name. + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **name**(`name`): `void` + +###### Parameters + +• **name**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:491](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L491) + +*** + +#### originalName + +##### Get Signature + +> **get** **originalName**(): `string` + +The original tag name that was used to construct the tag. + +###### Member + +###### Returns + +`string` + +##### Defined in + +[chord\_sheet/tag.ts:500](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L500) + +*** + +#### value + +##### Get Signature + +> **get** **value**(): `string` + +The tag value + +###### Member + +###### Returns + +`string` + +##### Set Signature + +> **set** **value**(`value`): `void` + +###### Parameters + +• **value**: `string` + +###### Returns + +`void` + +##### Defined in + +[chord\_sheet/tag.ts:513](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L513) + +### Methods + +#### clone() + +> **clone**(): [`Tag`](#classestagmd) + +Returns a clone of the tag. + +##### Returns + +[`Tag`](#classestagmd) + +The cloned tag + +##### Overrides + +`AstComponent.clone` + +##### Defined in + +[chord\_sheet/tag.ts:555](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L555) + +*** + +#### hasRenderableLabel() + +> **hasRenderableLabel**(): `boolean` + +Check whether this tag's label (if any) should be rendered, as applicable to tags like +`start_of_verse` and `start_of_chorus`. +See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, +https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/ + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:539](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L539) + +*** + +#### hasValue() + +> **hasValue**(): `boolean` + +Checks whether the tag value is a non-empty string. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:521](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L521) + +*** + +#### isInlineFontTag() + +> **isInlineFontTag**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:477](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L477) + +*** + +#### isMetaTag() + +> **isMetaTag**(): `boolean` + +Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`) + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:547](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L547) + +*** + +#### isRenderable() + +> **isRenderable**(): `boolean` + +Checks whether the tag is usually rendered inline. It currently only applies to comment tags. + +##### Returns + +`boolean` + +##### Defined in + +[chord\_sheet/tag.ts:529](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L529) + +*** + +#### isSectionDelimiter() + +> **isSectionDelimiter**(): `boolean` + +##### Returns + +`boolean` +##### Defined in -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| chords | string | |

The chords

| -| lyrics | string \| null | null |

The lyrics

| -| annotation | string \| null | null |

The annotation

| +[chord\_sheet/tag.ts:465](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L465) - +*** -### chordLyricsPair.chords : string -

The chords

+#### isSectionEnd() -**Kind**: instance property of [ChordLyricsPair](#ChordLyricsPair) - +> **isSectionEnd**(): `boolean` -### chordLyricsPair.lyrics : string -

The lyrics

+##### Returns -**Kind**: instance property of [ChordLyricsPair](#ChordLyricsPair) - +`boolean` -### chordLyricsPair.annotation : string -

The annotation

+##### Defined in -**Kind**: instance property of [ChordLyricsPair](#ChordLyricsPair) - +[chord\_sheet/tag.ts:473](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L473) -### chordLyricsPair.isRenderable() ⇒ boolean -

Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)

+*** -**Kind**: instance method of [ChordLyricsPair](#ChordLyricsPair) - +#### isSectionStart() -### chordLyricsPair.clone() ⇒ [ChordLyricsPair](#ChordLyricsPair) -

Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song

+> **isSectionStart**(): `boolean` -**Kind**: instance method of [ChordLyricsPair](#ChordLyricsPair) - +##### Returns -## Comment -

Represents a comment. See https://www.chordpro.org/chordpro/chordpro-file-format-specification/#overview

+`boolean` -**Kind**: global class +##### Defined in -* [Comment](#Comment) - * [.isRenderable()](#Comment+isRenderable) ⇒ boolean - * [.clone()](#Comment+clone) ⇒ [Comment](#Comment) +[chord\_sheet/tag.ts:469](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L469) - +*** -### comment.isRenderable() ⇒ boolean -

Indicates whether a Comment should be visible in a formatted chord sheet (except for ChordPro sheets)

+#### set() -**Kind**: instance method of [Comment](#Comment) - +> **set**(`__namedParameters`): [`Tag`](#classestagmd) -### comment.clone() ⇒ [Comment](#Comment) -

Returns a deep copy of the Comment, useful when programmatically transforming a song

+##### Parameters -**Kind**: instance method of [Comment](#Comment) - +• **\_\_namedParameters** -## Line -

Represents a line in a chord sheet, consisting of items of type ChordLyricsPair or Tag

+• **\_\_namedParameters.value**: `string` -**Kind**: global class +##### Returns -* [Line](#Line) - * [.isEmpty()](#Line+isEmpty) ⇒ boolean - * [.addItem(item)](#Line+addItem) - * [.hasRenderableItems()](#Line+hasRenderableItems) ⇒ boolean - * [.clone()](#Line+clone) ⇒ [Line](#Line) - * [.isBridge()](#Line+isBridge) ⇒ boolean - * [.isChorus()](#Line+isChorus) ⇒ boolean - * [.isGrid()](#Line+isGrid) ⇒ boolean - * [.isTab()](#Line+isTab) ⇒ boolean - * [.isVerse()](#Line+isVerse) ⇒ boolean - * ~~[.hasContent()](#Line+hasContent) ⇒ boolean~~ +[`Tag`](#classestagmd) - +##### Defined in -### line.isEmpty() ⇒ boolean -

Indicates whether the line contains any items

+[chord\_sheet/tag.ts:563](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L563) -**Kind**: instance method of [Line](#Line) - +*** -### line.addItem(item) -

Adds an item ([ChordLyricsPair](#ChordLyricsPair) or [Tag](#Tag)) to the line

+#### toString() -**Kind**: instance method of [Line](#Line) +> **toString**(): `string` -| Param | Type | Description | -| --- | --- | --- | -| item | [ChordLyricsPair](#ChordLyricsPair) \| [Tag](#Tag) |

The item to be added

| +Returns a string representation of an object. - +##### Returns -### line.hasRenderableItems() ⇒ boolean -

Indicates whether the line contains items that are renderable

+`string` -**Kind**: instance method of [Line](#Line) - +##### Defined in -### line.clone() ⇒ [Line](#Line) -

Returns a deep copy of the line and all of its items

+[chord\_sheet/tag.ts:559](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L559) -**Kind**: instance method of [Line](#Line) - +*** -### line.isBridge() ⇒ boolean -

Indicates whether the line type is [BRIDGE](#BRIDGE)

+#### parse() -**Kind**: instance method of [Line](#Line) - +> `static` **parse**(`tag`): `null` \| [`Tag`](#classestagmd) -### line.isChorus() ⇒ boolean -

Indicates whether the line type is [CHORUS](#CHORUS)

+##### Parameters -**Kind**: instance method of [Line](#Line) - +• **tag**: `string` \| [`Tag`](#classestagmd) -### line.isGrid() ⇒ boolean -

Indicates whether the line type is [GRID](#GRID)

+##### Returns -**Kind**: instance method of [Line](#Line) - +`null` \| [`Tag`](#classestagmd) -### line.isTab() ⇒ boolean -

Indicates whether the line type is [TAB](#TAB)

+##### Defined in -**Kind**: instance method of [Line](#Line) - +[chord\_sheet/tag.ts:437](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L437) -### line.isVerse() ⇒ boolean -

Indicates whether the line type is [VERSE](#VERSE)

+*** -**Kind**: instance method of [Line](#Line) - +#### parseOrFail() -### ~~line.hasContent() ⇒ boolean~~ -***Deprecated*** +> `static` **parseOrFail**(`tag`): [`Tag`](#classestagmd) -

Indicates whether the line contains items that are renderable. Please use [hasRenderableItems](hasRenderableItems)

+##### Parameters -**Kind**: instance method of [Line](#Line) - +• **tag**: `string` \| [`Tag`](#classestagmd) -## Metadata -

Stores song metadata. Properties can be accessed using the get() method:

-

const metadata = new Metadata({ author: 'John' }); -metadata.get('author') // => 'John'

-

See [get](#Metadata+get)

+##### Returns -**Kind**: global class +[`Tag`](#classestagmd) -* [Metadata](#Metadata) - * [.get(prop)](#Metadata+get) ⇒ Array.<String> \| String - * [.clone()](#Metadata+clone) ⇒ [Metadata](#Metadata) +##### Defined in - - -### metadata.get(prop) ⇒ Array.<String> \| String -

Reads a metadata value by key. This method supports simple value lookup, as well as fetching single array values.

-

This method deprecates direct property access, eg: metadata['author']

-

Examples:

-

const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); -metadata.get('lyricist') // => 'Pete' -metadata.get('author') // => ['John', 'Mary'] -metadata.get('author.1') // => 'John' -metadata.get('author.2') // => 'Mary'

-

Using a negative index will start counting at the end of the list:

-

const metadata = new Metadata({ lyricist: 'Pete', author: ['John', 'Mary'] }); -metadata.get('author.-1') // => 'Mary' -metadata.get('author.-2') // => 'John'

+[chord\_sheet/tag.ts:455](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L455) -**Kind**: instance method of [Metadata](#Metadata) -**Returns**: Array.<String> \| String -

the metadata value(s). If there is only one value, it will return a String, -else it returns an array of strings.

+*** -| Param | Description | -| --- | --- | -| prop |

the property name

| +#### parseWithRegex() - +> `static` **parseWithRegex**(`tag`, `regex`): `null` \| [`Tag`](#classestagmd) -### metadata.clone() ⇒ [Metadata](#Metadata) -

Returns a deep clone of this Metadata object

+##### Parameters -**Kind**: instance method of [Metadata](#Metadata) -**Returns**: [Metadata](#Metadata) -

the cloned Metadata object

- +• **tag**: `string` -## Paragraph -

Represents a paragraph of lines in a chord sheet

+• **regex**: `RegExp` -**Kind**: global class +##### Returns -* [Paragraph](#Paragraph) - * [.contents](#Paragraph+contents) ⇒ string - * [.label](#Paragraph+label) ⇒ string \| null - * [.type](#Paragraph+type) ⇒ string - * [.isLiteral()](#Paragraph+isLiteral) ⇒ boolean - * [.hasRenderableItems()](#Paragraph+hasRenderableItems) ⇒ boolean +`null` \| [`Tag`](#classestagmd) - +##### Defined in -### paragraph.contents ⇒ string -

Returns the paragraph contents as one string where lines are separated by newlines

+[chord\_sheet/tag.ts:445](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/tag.ts#L445) -**Kind**: instance property of [Paragraph](#Paragraph) - -### paragraph.label ⇒ string \| null -

Returns the label of the paragraph. The label is the value of the first section delimiter tag -in the first line.

+ -**Kind**: instance property of [Paragraph](#Paragraph) - +[**chordsheetjs**](#readmemd) • **Docs** -### paragraph.type ⇒ string -

Tries to determine the common type for all lines. If the types for all lines are equal, it returns that type. -If not, it returns [INDETERMINATE](#INDETERMINATE)

+*** -**Kind**: instance property of [Paragraph](#Paragraph) - +[chordsheetjs](#globalsmd) / Ternary -### paragraph.isLiteral() ⇒ boolean -

Indicates whether the paragraph only contains literals. If true, [contents](contents) can be used to retrieve -the paragraph contents as one string where lines are separated by newlines.

+## Class: Ternary -**Kind**: instance method of [Paragraph](#Paragraph) -**See**: [contents](contents) - +### Extends -### paragraph.hasRenderableItems() ⇒ boolean -

Indicates whether the paragraph contains lines with renderable items.

+- `Evaluatable` -**Kind**: instance method of [Paragraph](#Paragraph) -**See**: [Line.hasRenderableItems](Line.hasRenderableItems) - +### Constructors -## Song -

Represents a song in a chord sheet. Currently a chord sheet can only have one song.

+#### new Ternary() -**Kind**: global class +> **new Ternary**(`__namedParameters`): [`Ternary`](#classesternarymd) -* [Song](#Song) - * [new Song(metadata)](#new_Song_new) - * [.bodyLines](#Song+bodyLines) ⇒ [Array.<Line>](#Line) - * [.bodyParagraphs](#Song+bodyParagraphs) ⇒ [Array.<Paragraph>](#Paragraph) - * [.paragraphs](#Song+paragraphs) : [Array.<Paragraph>](#Paragraph) - * [.expandedBodyParagraphs](#Song+expandedBodyParagraphs) : [Array.<Paragraph>](#Paragraph) - * [.clone()](#Song+clone) ⇒ [Song](#Song) - * [.setKey(key)](#Song+setKey) ⇒ [Song](#Song) - * [.setCapo(capo)](#Song+setCapo) ⇒ [Song](#Song) - * [.transpose(delta, [options])](#Song+transpose) ⇒ [Song](#Song) - * [.transposeUp([options])](#Song+transposeUp) ⇒ [Song](#Song) - * [.transposeDown([options])](#Song+transposeDown) ⇒ [Song](#Song) - * [.changeKey(newKey)](#Song+changeKey) ⇒ [Song](#Song) - * [.useModifier(modifier)](#Song+useModifier) ⇒ [Song](#Song) - * [.changeMetadata(name, value)](#Song+changeMetadata) - * [.mapItems(func)](#Song+mapItems) ⇒ [Song](#Song) - * [.getChords()](#Song+getChords) ⇒ Array.<string> - * [.getChordDefinitions()](#Song+getChordDefinitions) ⇒ Record.<string, ChordDefinition> - * [.mapLines(func)](#Song+mapLines) ⇒ [Song](#Song) +##### Parameters - +• **\_\_namedParameters**: `TernaryProperties` -### new Song(metadata) -

Creates a new {Song} instance

+##### Returns +[`Ternary`](#classesternarymd) -| Param | Type | Description | -| --- | --- | --- | -| metadata | Object \| [Metadata](#Metadata) |

predefined metadata

| +##### Overrides - +`Evaluatable.constructor` -### song.bodyLines ⇒ [Array.<Line>](#Line) -

Returns the song lines, skipping the leading empty lines (empty as in not rendering any content). This is useful -if you want to skip the "header lines": the lines that only contain meta data.

+##### Defined in -**Kind**: instance property of [Song](#Song) -**Returns**: [Array.<Line>](#Line) -

The song body lines

- +[chord\_sheet/chord\_pro/ternary.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L24) -### song.bodyParagraphs ⇒ [Array.<Paragraph>](#Paragraph) -

Returns the song paragraphs, skipping the paragraphs that only contain empty lines -(empty as in not rendering any content)

+### Properties -**Kind**: instance property of [Song](#Song) -**See**: [bodyLines](bodyLines) - +#### column -### song.paragraphs : [Array.<Paragraph>](#Paragraph) -

The [Paragraph](#Paragraph) items of which the song consists

- -**Kind**: instance property of [Song](#Song) - +> **column**: `null` \| `number` = `null` -### song.expandedBodyParagraphs : [Array.<Paragraph>](#Paragraph) -

The body paragraphs of the song, with any {chorus} tag expanded into the targeted chorus

+##### Inherited from -**Kind**: instance property of [Song](#Song) - - -### song.clone() ⇒ [Song](#Song) -

Returns a deep clone of the song

- -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The cloned song

- - -### song.setKey(key) ⇒ [Song](#Song) -

Returns a copy of the song with the key value set to the specified key. It changes:

-
    -
  • the value for key in the [metadata](metadata) set
  • -
  • any existing key directive
  • -
- -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The changed song

+`Evaluatable.column` -| Param | Type | Description | -| --- | --- | --- | -| key | number \| null |

the key. Passing null will:

  • remove the current key from [metadata](metadata)
  • remove any key directive
| - - +##### Defined in -### song.setCapo(capo) ⇒ [Song](#Song) -

Returns a copy of the song with the key value set to the specified capo. It changes:

-
    -
  • the value for capo in the [metadata](metadata) set
  • -
  • any existing capo directive
  • -
- -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The changed song

- -| Param | Type | Description | -| --- | --- | --- | -| capo | number \| null |

the capo. Passing null will:

  • remove the current key from [metadata](metadata)
  • remove any capo directive
| - - - -### song.transpose(delta, [options]) ⇒ [Song](#Song) -

Transposes the song by the specified delta. It will:

-
    -
  • transpose all chords, see: [transpose](#Chord+transpose)
  • -
  • transpose the song key in [metadata](metadata)
  • -
  • update any existing key directive
  • -
+[chord\_sheet/ast\_component.ts:6](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L6) -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The transposed song

+*** -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| delta | number | |

The number of semitones (positive or negative) to transpose with

| -| [options] | Object | {} |

options

| -| [options.normalizeChordSuffix] | boolean | false |

whether to normalize the chord suffixes after transposing

| +#### falseExpression - +> **falseExpression**: `Evaluatable`[] = `[]` -### song.transposeUp([options]) ⇒ [Song](#Song) -

Transposes the song up by one semitone. It will:

-
    -
  • transpose all chords, see: [transpose](#Chord+transpose)
  • -
  • transpose the song key in [metadata](metadata)
  • -
  • update any existing key directive
  • -
+##### Defined in -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The transposed song

+[chord\_sheet/chord\_pro/ternary.ts:22](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L22) -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [options] | Object | {} |

options

| -| [options.normalizeChordSuffix] | boolean | false |

whether to normalize the chord suffixes after transposing

| +*** - +#### line -### song.transposeDown([options]) ⇒ [Song](#Song) -

Transposes the song down by one semitone. It will:

-
    -
  • transpose all chords, see: [transpose](#Chord+transpose)
  • -
  • transpose the song key in [metadata](metadata)
  • -
  • update any existing key directive
  • -
+> **line**: `null` \| `number` = `null` -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The transposed song

+##### Inherited from -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [options] | Object | {} |

options

| -| [options.normalizeChordSuffix] | boolean | false |

whether to normalize the chord suffixes after transposing

| +`Evaluatable.line` - +##### Defined in -### song.changeKey(newKey) ⇒ [Song](#Song) -

Returns a copy of the song with the key set to the specified key. It changes:

-
    -
  • the value for key in the [metadata](metadata) set
  • -
  • any existing key directive
  • -
  • all chords, those are transposed according to the distance between the current and the new key
  • -
+[chord\_sheet/ast\_component.ts:4](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L4) -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

The changed song

- -| Param | Type | Description | -| --- | --- | --- | -| newKey | string |

The new key.

| - - +*** -### song.useModifier(modifier) ⇒ [Song](#Song) -

Returns a copy of the song with all chords changed to the specified modifier.

+#### offset -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

the changed song

+> **offset**: `null` \| `number` = `null` -| Param | Type | Description | -| --- | --- | --- | -| modifier | Modifier |

the new modifier

| +##### Inherited from - +`Evaluatable.offset` -### song.changeMetadata(name, value) -

Returns a copy of the song with the directive value set to the specified value.

-
    -
  • when there is a matching directive in the song, it will update the directive
  • -
  • when there is no matching directive, it will be inserted -If value is null it will act as a delete, any directive matching name will be removed.
  • -
+##### Defined in -**Kind**: instance method of [Song](#Song) +[chord\_sheet/ast\_component.ts:8](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/ast_component.ts#L8) -| Param | Type | Description | -| --- | --- | --- | -| name | string |

The directive name

| -| value | string \| null |

The value to set, or null to remove the directive

| +*** - - -### song.mapItems(func) ⇒ [Song](#Song) -

Change the song contents inline. Return a new [Item](Item) to replace it. Return null to remove it.

+#### trueExpression -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

the changed song

+> **trueExpression**: `Evaluatable`[] = `[]` -| Param | Type | Description | -| --- | --- | --- | -| func | MapItemsCallback |

the callback function

| +##### Defined in -**Example** -```js -// transpose all chords: -song.mapItems((item) => { - if (item instanceof ChordLyricsPair) { - return item.transpose(2, 'D'); - } +[chord\_sheet/chord\_pro/ternary.ts:20](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L20) - return item; -}); -``` - +*** -### song.getChords() ⇒ Array.<string> -

Returns all unique chords used in the song

+#### valueTest -**Kind**: instance method of [Song](#Song) -**Returns**: Array.<string> -

the chords

- +> **valueTest**: `null` \| `string` -### song.getChordDefinitions() ⇒ Record.<string, ChordDefinition> -

Returns all chord definitions from the song. -Definitions are made using the {chord} or {define} directive. -A chord definitions overrides a previous chord definition for the exact same chord.

+##### Defined in -**Kind**: instance method of [Song](#Song) -**Returns**: Record.<string, ChordDefinition> -

the chord definitions

-**See** +[chord\_sheet/chord\_pro/ternary.ts:18](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L18) -- https://chordpro.org/chordpro/directives-define/ -- https://chordpro.org/chordpro/directives-chord/ +*** - +#### variable -### song.mapLines(func) ⇒ [Song](#Song) -

Change the song contents inline. Return a new [Line](#Line) to replace it. Return null to remove it.

+> **variable**: `null` \| `string` -**Kind**: instance method of [Song](#Song) -**Returns**: [Song](#Song) -

the changed song

+##### Defined in -| Param | Type | Description | -| --- | --- | --- | -| func | MapLinesCallback |

the callback function

| +[chord\_sheet/chord\_pro/ternary.ts:16](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L16) -**Example** -```js -// remove lines with only Tags: -song.mapLines((line) => { - if (line.items.every(item => item instanceof Tag)) { - return null; - } +### Methods - return line; -}); -``` - +#### clone() -## Tag -

Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/

+> **clone**(): [`Ternary`](#classesternarymd) -**Kind**: global class +##### Returns -* [Tag](#Tag) - * [.name](#Tag+name) : string - * [.originalName](#Tag+originalName) : string - * [.value](#Tag+value) : string - * [.hasValue()](#Tag+hasValue) ⇒ boolean - * [.isRenderable()](#Tag+isRenderable) ⇒ boolean - * [.hasRenderableLabel()](#Tag+hasRenderableLabel) - * [.isMetaTag()](#Tag+isMetaTag) ⇒ boolean - * [.clone()](#Tag+clone) ⇒ [Tag](#Tag) +[`Ternary`](#classesternarymd) - +##### Overrides -### tag.name : string -

The tag full name. When the original tag used the short name, name will return the full name.

+`Evaluatable.clone` -**Kind**: instance property of [Tag](#Tag) - +##### Defined in -### tag.originalName : string -

The original tag name that was used to construct the tag.

+[chord\_sheet/chord\_pro/ternary.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L98) -**Kind**: instance property of [Tag](#Tag) - +*** -### tag.value : string -

The tag value

+#### evaluate() -**Kind**: instance property of [Tag](#Tag) - +> **evaluate**(`metadata`, `metadataSeparator`?, `upperContext`?): `string` -### tag.hasValue() ⇒ boolean -

Checks whether the tag value is a non-empty string.

+Evaluate the meta expression -**Kind**: instance method of [Tag](#Tag) - +##### Parameters -### tag.isRenderable() ⇒ boolean -

Checks whether the tag is usually rendered inline. It currently only applies to comment tags.

+• **metadata**: [`Metadata`](#classesmetadatamd) -**Kind**: instance method of [Tag](#Tag) - +The metadata object to use for evaluating the expression -### tag.hasRenderableLabel() -

Check whether this tag's label (if any) should be rendered, as applicable to tags like -start_of_verse and start_of_chorus. -See https://chordpro.org/chordpro/directives-env_chorus/, https://chordpro.org/chordpro/directives-env_verse/, -https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/

+• **metadataSeparator?**: `string` -**Kind**: instance method of [Tag](#Tag) - +The metadata separator to use if necessary -### tag.isMetaTag() ⇒ boolean -

Checks whether the tag is either a standard meta tag or a custom meta directive ({x_some_name})

- -**Kind**: instance method of [Tag](#Tag) - +• **upperContext?**: `null` \| `string` = `null` -### tag.clone() ⇒ [Tag](#Tag) -

Returns a clone of the tag.

+##### Returns -**Kind**: instance method of [Tag](#Tag) -**Returns**: [Tag](#Tag) -

The cloned tag

- +`string` -## Chord -

Represents a Chord, consisting of a root, suffix (quality) and bass

+The evaluated expression -**Kind**: global class +##### Overrides -* [Chord](#Chord) - * _instance_ - * [.clone()](#Chord+clone) ⇒ [Chord](#Chord) - * [.toChordSymbol([referenceKey])](#Chord+toChordSymbol) ⇒ [Chord](#Chord) - * [.toChordSymbolString([referenceKey])](#Chord+toChordSymbolString) ⇒ string - * [.isChordSymbol()](#Chord+isChordSymbol) ⇒ boolean - * [.toChordSolfege([referenceKey])](#Chord+toChordSolfege) ⇒ [Chord](#Chord) - * [.toChordSolfegeString([referenceKey])](#Chord+toChordSolfegeString) ⇒ string - * [.isChordSolfege()](#Chord+isChordSolfege) ⇒ boolean - * [.toNumeric([referenceKey])](#Chord+toNumeric) ⇒ [Chord](#Chord) - * [.toNumeral([referenceKey])](#Chord+toNumeral) ⇒ [Chord](#Chord) - * [.toNumeralString([referenceKey])](#Chord+toNumeralString) ⇒ string - * [.isNumeric()](#Chord+isNumeric) ⇒ boolean - * [.toNumericString([referenceKey])](#Chord+toNumericString) ⇒ string - * [.isNumeral()](#Chord+isNumeral) ⇒ boolean - * [.toString([configuration])](#Chord+toString) ⇒ string - * [.normalize([key], [options])](#Chord+normalize) ⇒ [Chord](#Chord) - * [.useModifier(newModifier)](#Chord+useModifier) ⇒ [Chord](#Chord) - * [.transposeUp()](#Chord+transposeUp) ⇒ [Chord](#Chord) - * [.transposeDown()](#Chord+transposeDown) ⇒ [Chord](#Chord) - * [.transpose(delta)](#Chord+transpose) ⇒ [Chord](#Chord) - * _static_ - * [.parse(chordString)](#Chord.parse) ⇒ [Chord](#Chord) \| null +`Evaluatable.evaluate` - +##### Defined in -### chord.clone() ⇒ [Chord](#Chord) -

Returns a deep copy of the chord

+[chord\_sheet/chord\_pro/ternary.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L48) -**Kind**: instance method of [Chord](#Chord) - +*** -### chord.toChordSymbol([referenceKey]) ⇒ [Chord](#Chord) -

Converts the chord to a chord symbol, using the supplied key as a reference. -For example, a numeric chord #4 with reference key E will return the chord symbol A#. -When the chord is already a chord symbol, it will return a clone of the object.

+#### evaluateForTruthyValue() -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the chord symbol

+> **evaluateForTruthyValue**(`metadata`, `metadataSeparator`, `value`): `string` -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a numeric or numeral.

| +##### Parameters - +• **metadata**: [`Metadata`](#classesmetadatamd) -### chord.toChordSymbolString([referenceKey]) ⇒ string -

Converts the chord to a chord symbol string, using the supplied key as a reference. -For example, a numeric chord #4 with reference key E will return the chord symbol A#. -When the chord is already a chord symbol, it will return a string version of the chord.

+• **metadataSeparator**: `string` -**Kind**: instance method of [Chord](#Chord) -**Returns**: string -

the chord symbol string

-**See**: {toChordSymbol} +• **value**: `string` \| `string`[] -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a numeric or numeral.

| +##### Returns - +`string` -### chord.isChordSymbol() ⇒ boolean -

Determines whether the chord is a chord symbol

+##### Defined in -**Kind**: instance method of [Chord](#Chord) - +[chord\_sheet/chord\_pro/ternary.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L86) -### chord.toChordSolfege([referenceKey]) ⇒ [Chord](#Chord) -

Converts the chord to a chord solfege, using the supplied key as a reference. -For example, a numeric chord #4 with reference key Mi will return the chord symbol La#. -When the chord is already a chord solfege, it will return a clone of the object.

+*** -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the chord solfege

+#### evaluateToString() -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a numeric or numeral.

| +> **evaluateToString**(`value`, `metadataSeparator`): `string` - +##### Parameters -### chord.toChordSolfegeString([referenceKey]) ⇒ string -

Converts the chord to a chord solfege string, using the supplied key as a reference. -For example, a numeric chord #4 with reference key E will return the chord solfege A#. -When the chord is already a chord solfege, it will return a string version of the chord.

+• **value**: `string` \| `string`[] -**Kind**: instance method of [Chord](#Chord) -**Returns**: string -

the chord solfege string

-**See**: {toChordSolfege} +• **metadataSeparator**: `string` -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a numeric or numeral.

| +##### Returns - +`string` -### chord.isChordSolfege() ⇒ boolean -

Determines whether the chord is a chord solfege

- -**Kind**: instance method of [Chord](#Chord) - - -### chord.toNumeric([referenceKey]) ⇒ [Chord](#Chord) -

Converts the chord to a numeric chord, using the supplied key as a reference. -For example, a chord symbol A# with reference key E will return the numeric chord #4.

+##### Defined in -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the numeric chord

+[chord\_sheet/chord\_pro/ternary.ts:60](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L60) -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a chord symbol

| +*** - +#### evaluateWithVariable() -### chord.toNumeral([referenceKey]) ⇒ [Chord](#Chord) -

Converts the chord to a numeral chord, using the supplied key as a reference. -For example, a chord symbol A# with reference key E will return the numeral chord #IV.

+> **evaluateWithVariable**(`metadata`, `metadataSeparator`): `string` -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the numeral chord

+##### Parameters -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a chord symbol

| +• **metadata**: [`Metadata`](#classesmetadatamd) - +• **metadataSeparator**: `string` -### chord.toNumeralString([referenceKey]) ⇒ string -

Converts the chord to a numeral chord string, using the supplied kye as a reference. -For example, a chord symbol A# with reference key E will return the numeral chord #4.

+##### Returns -**Kind**: instance method of [Chord](#Chord) -**Returns**: string -

the numeral chord string

-**See**: {toNumeral} +`string` -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a chord symbol

| +##### Defined in - +[chord\_sheet/chord\_pro/ternary.ts:68](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L68) -### chord.isNumeric() ⇒ boolean -

Determines whether the chord is numeric

+*** -**Kind**: instance method of [Chord](#Chord) - +#### isRenderable() -### chord.toNumericString([referenceKey]) ⇒ string -

Converts the chord to a numeric chord string, using the supplied kye as a reference. -For example, a chord symbol A# with reference key E will return the numeric chord #4.

+> **isRenderable**(): `boolean` -**Kind**: instance method of [Chord](#Chord) -**Returns**: string -

the numeric chord string

-**See**: {toNumeric} +##### Returns -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [referenceKey] | [Key](#Key) \| string \| null | |

the reference key. The key is required when converting a chord symbol

| +`boolean` - +##### Defined in -### chord.isNumeral() ⇒ boolean -

Determines whether the chord is a numeral

+[chord\_sheet/chord\_pro/ternary.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/chord_sheet/chord_pro/ternary.ts#L94) -**Kind**: instance method of [Chord](#Chord) - -### chord.toString([configuration]) ⇒ string -

Converts the chord to a string, eg Esus4/G# or 1sus4/#3

+ -**Kind**: instance method of [Chord](#Chord) -**Returns**: string -

the chord string

+[**chordsheetjs**](#readmemd) • **Docs** -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [configuration] | Object | {} |

options

| -| [configuration.useUnicodeModifier] | boolean | false |

Whether or not to use unicode modifiers. This will make # (sharp) look like and b (flat) look like

| +*** - +[chordsheetjs](#globalsmd) / TextFormatter -### chord.normalize([key], [options]) ⇒ [Chord](#Chord) -

Normalizes the chord root and bass notes:

-
    -
  • Fab becomes Mi
  • -
  • Dob becomes Si
  • -
  • Si# becomes Do
  • -
  • Mi# becomes Fa
  • -
  • Fb becomes E
  • -
  • Cb becomes B
  • -
  • B# becomes C
  • -
  • E# becomes F
  • -
  • 4b becomes 3
  • -
  • 1b becomes 7
  • -
  • 7# becomes 1
  • -
  • 3# becomes 4
  • -
-

Besides that it normalizes the suffix if normalizeSuffix is true. -For example, sus2 becomes 2, sus4 becomes sus. -All suffix normalizations can be found in src/normalize_mappings/suffix-mapping.txt.

-

When the chord is minor, bass notes are normalized off of the relative major -of the root note. For example, Em/A# becomes Em/Bb.

+## Class: TextFormatter -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the normalized chord

+Formats a song into a plain text chord sheet -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [key] | [Key](#Key) \| string | |

the key to normalize to

| -| [options] | Object | {} |

options

| -| [options.normalizeSuffix] | boolean | true |

whether to normalize the chord suffix after transposing

| +### Extends - +- [`Formatter`](#classesformattermd) -### chord.useModifier(newModifier) ⇒ [Chord](#Chord) -

Switches to the specified modifier

+### Constructors -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the new, changed chord

+#### new TextFormatter() -| Param | Description | -| --- | --- | -| newModifier |

the modifier to use: '#' or 'b'

| +> **new TextFormatter**(`configuration`?): [`TextFormatter`](#classestextformattermd) - +Instantiate -### chord.transposeUp() ⇒ [Chord](#Chord) -

Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E

+##### Parameters -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the new, transposed chord

- +• **configuration?**: `Partial`\<`ConfigurationProperties`\> = `{}` -### chord.transposeDown() ⇒ [Chord](#Chord) -

Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb

+options -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the new, transposed chord

- +##### Returns -### chord.transpose(delta) ⇒ [Chord](#Chord) -

Transposes the chord by the specified number of semitones

+[`TextFormatter`](#classestextformattermd) -**Kind**: instance method of [Chord](#Chord) -**Returns**: [Chord](#Chord) -

the new, transposed chord

+##### Inherited from -| Param | Description | -| --- | --- | -| delta |

de number of semitones

| +[`Formatter`](#classesformattermd).[`constructor`](#constructors) - +##### Defined in -### Chord.parse(chordString) ⇒ [Chord](#Chord) \| null -

Tries to parse a chord string into a chord -Any leading or trailing whitespace is removed first, so a chord like \n E/G# \r is valid.

+[formatter/formatter.ts:26](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L26) -**Kind**: static method of [Chord](#Chord) +### Properties -| Param | Description | -| --- | --- | -| chordString |

the chord string, eg Esus4/G# or 1sus4/#3.

| +#### configuration - +> **configuration**: `Configuration` -## ChordProFormatter -

Formats a song into a ChordPro chord sheet

+##### Inherited from -**Kind**: global class - +[`Formatter`](#classesformattermd).[`configuration`](#configuration) -### chordProFormatter.format(song) ⇒ string -

Formats a song into a ChordPro chord sheet.

+##### Defined in -**Kind**: instance method of [ChordProFormatter](#ChordProFormatter) -**Returns**: string -

The ChordPro string

+[formatter/formatter.ts:7](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/formatter.ts#L7) -| Param | Type | Description | -| --- | --- | --- | -| song | [Song](#Song) |

The song to be formatted

| +*** - +#### song -## ChordsOverWordsFormatter -

Formats a song into a plain text chord sheet

+> **song**: [`Song`](#classessongmd) -**Kind**: global class - +##### Defined in -### chordsOverWordsFormatter.format(song) ⇒ string -

Formats a song into a plain text chord sheet

+[formatter/text\_formatter.ts:17](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L17) -**Kind**: instance method of [ChordsOverWordsFormatter](#ChordsOverWordsFormatter) -**Returns**: string -

the chord sheet

+### Methods -| Param | Type | Description | -| --- | --- | --- | -| song | [Song](#Song) |

The song to be formatted

| +#### chordLyricsPairLength() - +> **chordLyricsPairLength**(`chordLyricsPair`, `line`): `number` -## Formatter -

Base class for all formatters, taking care of receiving a configuration wrapping that inside a Configuration object

+##### Parameters -**Kind**: global class - +• **chordLyricsPair**: [`ChordLyricsPair`](#classeschordlyricspairmd) -### new Formatter([configuration]) -

Instantiate

+• **line**: [`Line`](#classeslinemd) +##### Returns -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [configuration] | Object | {} |

options

| -| [configuration.evaluate] | boolean | false |

Whether or not to evaluate meta expressions. For more info about meta expressions, see: https://bit.ly/2SC9c2u

| -| [configuration.metadata] | object | {} | | -| [configuration.metadata.separator] | string | "\", \"" |

The separator to be used when rendering a metadata value that has multiple values. See: https://bit.ly/2SC9c2u

| -| [configuration.key] | [Key](#Key) \| string | |

The key to use for rendering. The chord sheet will be transposed from the song's original key (as indicated by the {key} directive) to the specified key. Note that transposing will only work if the original song key is set.

| -| [configuration.expandChorusDirective] | boolean | false |

Whether or not to expand {chorus} directives by rendering the last defined chorus inline after the directive.

| -| [configuration.useUnicodeModifiers] | boolean | false |

Whether or not to use unicode flat and sharp symbols.

| -| [configuration.normalizeChords] | boolean | true |

Whether or not to automatically normalize chords

| +`number` - +##### Defined in -## HtmlDivFormatter -

Formats a song into HTML. It uses DIVs to align lyrics with chords, which makes it useful for responsive web pages.

+[formatter/text\_formatter.ts:102](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L102) -**Kind**: global class - +*** -## HtmlFormatter -

Acts as a base class for HTML formatters

+#### format() -**Kind**: global class +> **format**(`song`): `string` -* [HtmlFormatter](#HtmlFormatter) - * [.cssObject](#HtmlFormatter+cssObject) ⇒ Object.<string, Object.<string, string>> - * [.format(song)](#HtmlFormatter+format) ⇒ string - * [.cssString(scope)](#HtmlFormatter+cssString) ⇒ string +Formats a song into a plain text chord sheet - +##### Parameters -### htmlFormatter.cssObject ⇒ Object.<string, Object.<string, string>> -

Basic CSS, in object style à la useStyles, to use with the HTML output -For a CSS string see [cssString](cssString)

-

Example:

-
'.paragraph': {
-  marginBottom: '1em'
-}
-
+• **song**: [`Song`](#classessongmd) -**Kind**: instance property of [HtmlFormatter](#HtmlFormatter) -**Returns**: Object.<string, Object.<string, string>> -

the CSS object

- +The song to be formatted -### htmlFormatter.format(song) ⇒ string -

Formats a song into HTML.

+##### Returns -**Kind**: instance method of [HtmlFormatter](#HtmlFormatter) -**Returns**: string -

The HTML string

+`string` -| Param | Type | Description | -| --- | --- | --- | -| song | [Song](#Song) |

The song to be formatted

| +the chord sheet - +##### Defined in -### htmlFormatter.cssString(scope) ⇒ string -

Generates basic CSS, optionally scoped within the provided selector, to use with the HTML output

-

For example, execute cssString('.chordSheetViewer') will result in CSS like:

-
.chordSheetViewer .paragraph {
-  margin-bottom: 1em;
-}
-
+[formatter/text\_formatter.ts:24](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L24) -**Kind**: instance method of [HtmlFormatter](#HtmlFormatter) -**Returns**: string -

the CSS string

+*** -| Param | Description | -| --- | --- | -| scope |

the CSS scope to use, for example .chordSheetViewer

| +#### formatHeader() - +> **formatHeader**(): `string` -## HtmlTableFormatter -

Formats a song into HTML. It uses TABLEs to align lyrics with chords, which makes the HTML for things like -PDF conversion.

+##### Returns -**Kind**: global class - +`string` -## TextFormatter -

Formats a song into a plain text chord sheet

+##### Defined in -**Kind**: global class - +[formatter/text\_formatter.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L33) -### textFormatter.format(song) ⇒ string -

Formats a song into a plain text chord sheet

+*** -**Kind**: instance method of [TextFormatter](#TextFormatter) -**Returns**: string -

the chord sheet

+#### formatItemBottom() -| Param | Type | Description | -| --- | --- | --- | -| song | [Song](#Song) |

The song to be formatted

| +> **formatItemBottom**(`item`, `metadata`, `line`): `string` - +##### Parameters -## Key -

Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral).

-

The only function considered public API is Key.distance

+• **item**: `Item` -**Kind**: global class - +• **metadata**: [`Metadata`](#classesmetadatamd) -### Key.distance(oneKey, otherKey) ⇒ number -

Calculates the distance in semitones between one key and another.

+• **line**: [`Line`](#classeslinemd) -**Kind**: static method of [Key](#Key) -**Returns**: number -

the distance in semitones

+##### Returns -| Param | Type | Description | -| --- | --- | --- | -| oneKey | [Key](#Key) \| string |

the key

| -| otherKey | [Key](#Key) \| string |

the other key

| +`string` - +##### Defined in -## ChordProParser -

Parses a ChordPro chord sheet

+[formatter/text\_formatter.ts:161](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L161) -**Kind**: global class +*** -* [ChordProParser](#ChordProParser) - * [.warnings](#ChordProParser+warnings) : [Array.<ParserWarning>](#ParserWarning) - * [.parse(chordSheet, options)](#ChordProParser+parse) ⇒ [Song](#Song) +#### formatItemTop() - +> **formatItemTop**(`item`, `_metadata`, `line`): `string` -### chordProParser.warnings : [Array.<ParserWarning>](#ParserWarning) -

All warnings raised during parsing the chord sheet

+##### Parameters -**Kind**: instance property of [ChordProParser](#ChordProParser) - +• **item**: `Item` -### chordProParser.parse(chordSheet, options) ⇒ [Song](#Song) -

Parses a ChordPro chord sheet into a song

+• **\_metadata**: [`Metadata`](#classesmetadatamd) -**Kind**: instance method of [ChordProParser](#ChordProParser) -**Returns**: [Song](#Song) -

The parsed song

-**See**: https://peggyjs.org/documentation.html#using-the-parser +• **line**: [`Line`](#classeslinemd) -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| chordSheet | string | |

the ChordPro chord sheet

| -| options | ChordProParserOptions | |

Parser options.

| -| options.softLineBreaks | ChordProParserOptions.softLineBreaks | false |

If true, a backslash followed by * a space is treated as a soft line break

| +##### Returns - +`string` -## ~~ChordSheetParser~~ -***Deprecated*** +##### Defined in -

Parses a normal chord sheet

-

ChordSheetParser is deprecated, please use ChordsOverWordsParser.

-

ChordsOverWordsParser aims to support any kind of chord, whereas ChordSheetParser lacks -support for many variations. Besides that, some chordpro feature have been ported back -to ChordsOverWordsParser, which adds some interesting functionality.

+[formatter/text\_formatter.ts:129](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L129) -**Kind**: global class +*** -* ~~[ChordSheetParser](#ChordSheetParser)~~ - * [new ChordSheetParser([options])](#new_ChordSheetParser_new) - * [.parse(chordSheet, [options])](#ChordSheetParser+parse) ⇒ [Song](#Song) +#### formatLine() - +> **formatLine**(`line`, `metadata`): `string` -### new ChordSheetParser([options]) -

Instantiate a chord sheet parser -ChordSheetParser is deprecated, please use ChordsOverWordsParser.

+##### Parameters +• **line**: [`Line`](#classeslinemd) -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [options] | Object | {} |

options

| -| [options.preserveWhitespace] | boolean | true |

whether to preserve trailing whitespace for chords

| +• **metadata**: [`Metadata`](#classesmetadatamd) - +##### Returns -### chordSheetParser.parse(chordSheet, [options]) ⇒ [Song](#Song) -

Parses a chord sheet into a song

+`string` -**Kind**: instance method of [ChordSheetParser](#ChordSheetParser) -**Returns**: [Song](#Song) -

The parsed song

+##### Defined in -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| chordSheet | string | |

The ChordPro chord sheet

| -| [options] | Object | {} |

Optional parser options

| -| [options.song] | [Song](#Song) | |

The [Song](#Song) to store the song data in

| +[formatter/text\_formatter.ts:66](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L66) - +*** -## ChordsOverWordsParser -

Parses a chords over words sheet into a song

-

It support "regular" chord sheets:

-
       Am         C/G        F          C
-Let it be, let it be, let it be, let it be
-C                G              F  C/E Dm C
-Whisper words of wisdom, let it be
-
-

Additionally, some chordpro features have been "ported back". For example, you can use chordpro directives:

-
{title: Let it be}
-{key: C}
-Chorus 1:
-       Am
-Let it be
-
-

For convenience, you can leave out the brackets:

-
title: Let it be
-Chorus 1:
-       Am
-Let it be
-
-

You can even use a markdown style frontmatter separator to separate the header from the song:

-
title: Let it be
-key: C
----
-Chorus 1:
-       Am         C/G        F          C
-Let it be, let it be, let it be, let it be
-C                G              F  C/E Dm C
-Whisper words of wisdom, let it be
-
-

ChordsOverWordsParser is the better version of ChordSheetParser, which is deprecated.

+#### formatLineBottom() + +> **formatLineBottom**(`line`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:142](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L142) + +*** + +#### formatLineTop() + +> **formatLineTop**(`line`, `metadata`): `null` \| `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`null` \| `string` + +##### Defined in + +[formatter/text\_formatter.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L94) + +*** + +#### formatLineWithFormatter() + +> **formatLineWithFormatter**(`line`, `formatter`, `metadata`): `string` + +##### Parameters + +• **line**: [`Line`](#classeslinemd) + +• **formatter** + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:150](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L150) + +*** + +#### formatParagraph() + +> **formatParagraph**(`paragraph`, `metadata`): `string` + +##### Parameters + +• **paragraph**: [`Paragraph`](#classesparagraphmd) + +• **metadata**: [`Metadata`](#classesmetadatamd) + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:53](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L53) + +*** + +#### formatParagraphs() + +> **formatParagraphs**(): `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:44](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L44) + +*** + +#### formatSubTitle() + +> **formatSubTitle**(`subtitle`): `string` + +##### Parameters + +• **subtitle**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:86](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L86) + +*** + +#### formatTitle() + +> **formatTitle**(`title`): `string` + +##### Parameters + +• **title**: `null` \| `string` + +##### Returns + +`string` + +##### Defined in + +[formatter/text\_formatter.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/formatter/text_formatter.ts#L78) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / UltimateGuitarParser + +## Class: UltimateGuitarParser + +Parses an Ultimate Guitar chord sheet with metadata +Inherits from [ChordSheetParser](#classeschordsheetparsermd) + +### Extends + +- [`ChordSheetParser`](#classeschordsheetparsermd) + +### Constructors + +#### new UltimateGuitarParser() + +> **new UltimateGuitarParser**(`options`?): [`UltimateGuitarParser`](#classesultimateguitarparsermd) + +Instantiate a chord sheet parser + +##### Parameters + +• **options?** = `{}` + +options + +• **options.preserveWhitespace?**: `boolean` = `true` + +whether to preserve trailing whitespace for chords + +##### Returns + +[`UltimateGuitarParser`](#classesultimateguitarparsermd) + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`constructor`](#constructors) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:38](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L38) + +### Properties + +#### chordLyricsPair + +> **chordLyricsPair**: `null` \| [`ChordLyricsPair`](#classeschordlyricspairmd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`chordLyricsPair`](#chordlyricspair) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L31) + +*** + +#### currentLine + +> **currentLine**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`currentLine`](#currentline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:35](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L35) + +*** + +#### currentSectionType + +> **currentSectionType**: `null` \| `string` = `null` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:31](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L31) + +*** + +#### lineCount + +> **lineCount**: `number` = `0` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lineCount`](#linecount) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:37](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L37) + +*** + +#### lines + +> **lines**: `string`[] = `[]` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`lines`](#lines) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:33](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L33) + +*** + +#### preserveWhitespace + +> **preserveWhitespace**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`preserveWhitespace`](#preservewhitespace) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:23](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L23) + +*** + +#### processingText + +> **processingText**: `boolean` = `true` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processingText`](#processingtext) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:21](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L21) + +*** + +#### song + +> **song**: [`Song`](#classessongmd) + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`song`](#song) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:25](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L25) + +*** + +#### songBuilder + +> **songBuilder**: `SongBuilder` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songBuilder`](#songbuilder) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L27) + +*** + +#### songLine + +> **songLine**: `null` \| [`Line`](#classeslinemd) = `null` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`songLine`](#songline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:29](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L29) + +### Methods + +#### addCharacter() + +> **addCharacter**(`chr`, `nextChar`): `void` + +##### Parameters + +• **chr**: `any` + +• **nextChar**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`addCharacter`](#addcharacter) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:160](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L160) + +*** + +#### endOfSong() + +> **endOfSong**(): `void` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`endOfSong`](#endofsong) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:79](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L79) + +*** + +#### endSection() + +> **endSection**(`__namedParameters`): `void` + +##### Parameters + +• **\_\_namedParameters** = `{}` + +• **\_\_namedParameters.addNewLine**: `undefined` \| `boolean` = `true` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:100](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L100) + +*** + +#### ensureChordLyricsPairInitialized() + +> **ensureChordLyricsPairInitialized**(): `void` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`ensureChordLyricsPairInitialized`](#ensurechordlyricspairinitialized) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:177](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L177) + +*** + +#### hasNextLine() + +> **hasNextLine**(): `boolean` + +##### Returns + +`boolean` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`hasNextLine`](#hasnextline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:124](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L124) + +*** + +#### initialize() + +> **initialize**(`document`, `song`): `void` + +##### Parameters + +• **document**: `any` + +• **song**: `null` \| [`Song`](#classessongmd) = `null` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`initialize`](#initialize) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:107](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L107) + +*** + +#### isSectionEnd() + +> **isSectionEnd**(): `boolean` + +##### Returns + +`boolean` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:72](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L72) + +*** + +#### parse() + +> **parse**(`chordSheet`, `options`?): [`Song`](#classessongmd) + +Parses a chord sheet into a song + +##### Parameters + +• **chordSheet**: `string` + +The ChordPro chord sheet + +• **options?** = `{}` + +Optional parser options + +• **options.song?**: [`Song`](#classessongmd) + +The [Song](#classessongmd) to store the song data in + +##### Returns + +[`Song`](#classessongmd) + +The parsed song + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parse`](#parse) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:70](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L70) + +*** + +#### parseLine() + +> **parseLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Overrides + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLine`](#parseline) + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:42](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L42) + +*** + +#### parseLyricsWithChords() + +> **parseLyricsWithChords**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseLyricsWithChords`](#parselyricswithchords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:128](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L128) + +*** + +#### parseNonEmptyLine() + +> **parseNonEmptyLine**(`line`): `void` + +##### Parameters + +• **line**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`parseNonEmptyLine`](#parsenonemptyline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:94](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L94) + +*** + +#### processCharacters() + +> **processCharacters**(`chordsLine`, `lyricsLine`): `void` + +##### Parameters + +• **chordsLine**: `any` + +• **lyricsLine**: `any` + +##### Returns + +`void` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`processCharacters`](#processcharacters) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:146](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L146) + +*** + +#### readLine() + +> **readLine**(): `string` + +##### Returns + +`string` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`readLine`](#readline) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:118](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L118) + +*** + +#### shouldAddCharacterToChords() + +> **shouldAddCharacterToChords**(`nextChar`): `any` + +##### Parameters + +• **nextChar**: `any` + +##### Returns + +`any` + +##### Inherited from + +[`ChordSheetParser`](#classeschordsheetparsermd).[`shouldAddCharacterToChords`](#shouldaddcharactertochords) + +##### Defined in + +[parser/chord\_sheet\_parser.ts:173](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/chord_sheet_parser.ts#L173) + +*** + +#### startNewLine() + +> **startNewLine**(): `void` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:113](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L113) + +*** + +#### startSection() + +> **startSection**(`sectionType`, `label`): `void` + +##### Parameters + +• **sectionType**: `"chorus"` \| `"verse"` + +• **label**: `string` + +##### Returns + +`void` + +##### Defined in + +[parser/ultimate\_guitar\_parser.ts:87](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/parser/ultimate_guitar_parser.ts#L87) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +# chordsheetjs + +## Classes + +- [Chord](#classeschordmd) +- [ChordDefinition](#classeschorddefinitionmd) +- [ChordLyricsPair](#classeschordlyricspairmd) +- [ChordProFormatter](#classeschordproformattermd) +- [ChordProParser](#classeschordproparsermd) +- [ChordSheetParser](#classeschordsheetparsermd) +- [ChordSheetSerializer](#classeschordsheetserializermd) +- [ChordsOverWordsFormatter](#classeschordsoverwordsformattermd) +- [ChordsOverWordsParser](#classeschordsoverwordsparsermd) +- [Comment](#classescommentmd) +- [Composite](#classescompositemd) +- [Formatter](#classesformattermd) +- [HtmlDivFormatter](#classeshtmldivformattermd) +- [HtmlFormatter](#classeshtmlformattermd) +- [HtmlTableFormatter](#classeshtmltableformattermd) +- [Key](#classeskeymd) +- [Line](#classeslinemd) +- [Literal](#classesliteralmd) +- [Metadata](#classesmetadatamd) +- [Paragraph](#classesparagraphmd) +- [SoftLineBreak](#classessoftlinebreakmd) +- [Song](#classessongmd) +- [Tag](#classestagmd) +- [Ternary](#classesternarymd) +- [TextFormatter](#classestextformattermd) +- [UltimateGuitarParser](#classesultimateguitarparsermd) + +## Variables + +- [ABC](#variablesabcmd) +- [CHORUS](#variableschorusmd) +- [default](#variablesdefaultmd) +- [INDETERMINATE](#variablesindeterminatemd) +- [LILYPOND](#variableslilypondmd) +- [NONE](#variablesnonemd) +- [NUMERAL](#variablesnumeralmd) +- [NUMERIC](#variablesnumericmd) +- [SOLFEGE](#variablessolfegemd) +- [SYMBOL](#variablessymbolmd) +- [TAB](#variablestabmd) +- [templateHelpers](#variablestemplatehelpersmd) +- [VERSE](#variablesversemd) + +# Variables + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / ABC + +## Variable: ABC + +> `const` **ABC**: `"abc"` = `'abc'` + +Used to mark a section as ABC music notation + +### Constant + +### Defined in + +[constants.ts:62](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L62) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / CHORUS + +## Variable: CHORUS + +> `const` **CHORUS**: `"chorus"` = `'chorus'` + +Used to mark a paragraph as chorus + +### Constant + +### Defined in + +[constants.ts:13](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L13) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / INDETERMINATE + +## Variable: INDETERMINATE + +> `const` **INDETERMINATE**: `"indeterminate"` = `'indeterminate'` + +Used to mark a paragraph as containing lines with both verse and chorus type + +### Constant + +### Defined in + +[constants.ts:27](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L27) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / LILYPOND + +## Variable: LILYPOND + +> `const` **LILYPOND**: `"ly"` = `'ly'` + +Used to mark a section as Lilypond notation + +### Constant + +### Defined in + +[constants.ts:55](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L55) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NONE + +## Variable: NONE + +> `const` **NONE**: `"none"` = `'none'` + +Used to mark a paragraph as not containing a line marked with a type + +### Constant + +### Defined in + +[constants.ts:34](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L34) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERAL + +## Variable: NUMERAL + +> `const` **NUMERAL**: `"numeral"` = `'numeral'` + +### Defined in + +[constants.ts:77](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L77) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / NUMERIC + +## Variable: NUMERIC + +> `const` **NUMERIC**: `"numeric"` = `'numeric'` + +### Defined in + +[constants.ts:76](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L76) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SOLFEGE + +## Variable: SOLFEGE + +> `const` **SOLFEGE**: `"solfege"` = `'solfege'` + +### Defined in + +[constants.ts:78](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L78) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / SYMBOL + +## Variable: SYMBOL + +> `const` **SYMBOL**: `"symbol"` = `'symbol'` + +### Defined in + +[constants.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L75) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / TAB + +## Variable: TAB + +> `const` **TAB**: `"tab"` = `'tab'` + +Used to mark a paragraph as tab + +### Constant + +### Defined in + +[constants.ts:41](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L41) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / VERSE + +## Variable: VERSE + +> `const` **VERSE**: `"verse"` = `'verse'` + +Used to mark a paragraph as verse + +### Constant + +### Defined in + +[constants.ts:48](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/constants.ts#L48) + + + + +[**chordsheetjs**](#readmemd) • **Docs** + +*** + +[chordsheetjs](#globalsmd) / default + +## Variable: default + +> **default**: `object` + +### Type declaration + +#### Chord + +> **Chord**: *typeof* [`Chord`](#classeschordmd) + +#### ChordDefinition + +> **ChordDefinition**: *typeof* [`ChordDefinition`](#classeschorddefinitionmd) + +#### ChordLyricsPair + +> **ChordLyricsPair**: *typeof* [`ChordLyricsPair`](#classeschordlyricspairmd) + +#### ChordProFormatter + +> **ChordProFormatter**: *typeof* [`ChordProFormatter`](#classeschordproformattermd) + +#### ChordProParser + +> **ChordProParser**: *typeof* [`ChordProParser`](#classeschordproparsermd) + +#### ChordSheetParser + +> **ChordSheetParser**: *typeof* [`ChordSheetParser`](#classeschordsheetparsermd) + +#### ChordSheetSerializer + +> **ChordSheetSerializer**: *typeof* [`ChordSheetSerializer`](#classeschordsheetserializermd) + +#### ChordsOverWordsFormatter + +> **ChordsOverWordsFormatter**: *typeof* [`ChordsOverWordsFormatter`](#classeschordsoverwordsformattermd) + +#### ChordsOverWordsParser + +> **ChordsOverWordsParser**: *typeof* [`ChordsOverWordsParser`](#classeschordsoverwordsparsermd) + +#### CHORUS + +> **CHORUS**: `string` + +#### Comment + +> **Comment**: *typeof* [`Comment`](#classescommentmd) + +#### Composite + +> **Composite**: *typeof* [`Composite`](#classescompositemd) -**Kind**: global class +#### HtmlDivFormatter -* [ChordsOverWordsParser](#ChordsOverWordsParser) - * [.warnings](#ChordsOverWordsParser+warnings) : [Array.<ParserWarning>](#ParserWarning) - * [.parse(chordSheet, options)](#ChordsOverWordsParser+parse) ⇒ [Song](#Song) +> **HtmlDivFormatter**: *typeof* [`HtmlDivFormatter`](#classeshtmldivformattermd) - +#### HtmlTableFormatter -### chordsOverWordsParser.warnings : [Array.<ParserWarning>](#ParserWarning) -

All warnings raised during parsing the chord sheet

+> **HtmlTableFormatter**: *typeof* [`HtmlTableFormatter`](#classeshtmltableformattermd) -**Kind**: instance property of [ChordsOverWordsParser](#ChordsOverWordsParser) - +#### INDETERMINATE -### chordsOverWordsParser.parse(chordSheet, options) ⇒ [Song](#Song) -

Parses a chords over words sheet into a song

+> **INDETERMINATE**: `string` -**Kind**: instance method of [ChordsOverWordsParser](#ChordsOverWordsParser) -**Returns**: [Song](#Song) -

The parsed song

-**See**: https://peggyjs.org/documentation.html#using-the-parser +#### Line -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| chordSheet | string | |

the chords over words sheet

| -| options | ChordsOverWordsParserOptions | |

Parser options.

| -| options.softLineBreaks | ChordsOverWordsParserOptions.softLineBreaks | false |

If true, a backslash followed by a space is treated as a soft line break

| +> **Line**: *typeof* [`Line`](#classeslinemd) - +#### Literal -## ParserWarning -

Represents a parser warning, currently only used by ChordProParser.

+> **Literal**: *typeof* [`Literal`](#classesliteralmd) -**Kind**: global class - +#### Metadata -### parserWarning.toString() ⇒ string -

Returns a stringified version of the warning

+> **Metadata**: *typeof* [`Metadata`](#classesmetadatamd) -**Kind**: instance method of [ParserWarning](#ParserWarning) -**Returns**: string -

The string warning

- +#### NONE -## UltimateGuitarParser -

Parses an Ultimate Guitar chord sheet with metadata -Inherits from [ChordSheetParser](#ChordSheetParser)

+> **NONE**: `string` -**Kind**: global class - +#### Paragraph -### new UltimateGuitarParser([options]) -

Instantiate a chord sheet parser

+> **Paragraph**: *typeof* [`Paragraph`](#classesparagraphmd) +#### SoftLineBreak -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [options] | Object | {} |

options

| -| [options.preserveWhitespace] | boolean | true |

whether to preserve trailing whitespace for chords

| +> **SoftLineBreak**: *typeof* [`SoftLineBreak`](#classessoftlinebreakmd) - +#### Song -## ALBUM : string -

Album meta directive. See https://www.chordpro.org/chordpro/directives-album/

+> **Song**: *typeof* [`Song`](#classessongmd) -**Kind**: global constant - +#### TAB -## ARRANGER : string -

Arranger meta directive. See https://chordpro.org/chordpro/directives-arranger/

+> **TAB**: `string` -**Kind**: global constant - +#### Tag -## ARTIST : string -

Artist meta directive. See https://www.chordpro.org/chordpro/directives-artist/

+> **Tag**: *typeof* [`Tag`](#classestagmd) -**Kind**: global constant - +#### Ternary -## CAPO : string -

Capo meta directive. See https://www.chordpro.org/chordpro/directives-capo/

+> **Ternary**: *typeof* [`Ternary`](#classesternarymd) -**Kind**: global constant - +#### TextFormatter -## COMMENT : string -

Comment directive. See https://www.chordpro.org/chordpro/directives-comment/

+> **TextFormatter**: *typeof* [`TextFormatter`](#classestextformattermd) -**Kind**: global constant - +#### UltimateGuitarParser -## COMPOSER : string -

Composer meta directive. See https://www.chordpro.org/chordpro/directives-composer/

+> **UltimateGuitarParser**: *typeof* [`UltimateGuitarParser`](#classesultimateguitarparsermd) -**Kind**: global constant - +#### VERSE -## COPYRIGHT : string -

Copyright meta directive. See https://www.chordpro.org/chordpro/directives-copyright/

+> **VERSE**: `string` -**Kind**: global constant - +### Defined in -## DURATION : string -

Duration meta directive. See https://www.chordpro.org/chordpro/directives-duration/

+[index.ts:75](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/index.ts#L75) -**Kind**: global constant - -## END\_OF\_ABC : string -

End of ABC music notation section See https://chordpro.org/chordpro/directives-env_abc/

+ -**Kind**: global constant - +[**chordsheetjs**](#readmemd) • **Docs** -## END\_OF\_BRIDGE : string -

End of bridge directive. See https://chordpro.org/chordpro/directives-env_bridge/

+*** -**Kind**: global constant - +[chordsheetjs](#globalsmd) / templateHelpers -## END\_OF\_CHORUS : string -

End of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/

+## Variable: templateHelpers -**Kind**: global constant - +> **templateHelpers**: `object` -## END\_OF\_GRID : string -

End of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/

+### Type declaration -**Kind**: global constant - +#### each() -## END\_OF\_LY : string -

End of Lilypond music notation section See https://chordpro.org/chordpro/directives-env_ly/

+> **each**: (`collection`, `callback`) => `string` -**Kind**: global constant - +##### Parameters -## END\_OF\_TAB : string -

End of tab directive. See https://www.chordpro.org/chordpro/directives-env_tab/

+• **collection**: `any`[] -**Kind**: global constant - +• **callback**: `EachCallback` -## END\_OF\_VERSE : string -

End of verse directive. See https://www.chordpro.org/chordpro/directives-env_verse/

+##### Returns -**Kind**: global constant - +`string` -## KEY : string -

Key meta directive. See https://www.chordpro.org/chordpro/directives-key/

+#### evaluate() -**Kind**: global constant - +> **evaluate**: (`item`, `metadata`, `configuration`) => `string` -## \_KEY : string -

_Key meta directive. Reflects the key as transposed by the capo value -See https://www.chordpro.org/chordpro/directives-key/

+##### Parameters -**Kind**: global constant - +• **item**: `Evaluatable` -## LYRICIST : string -

Lyricist meta directive. See https://www.chordpro.org/chordpro/directives-lyricist/

+• **metadata**: [`Metadata`](#classesmetadatamd) -**Kind**: global constant - +• **configuration**: `Configuration` -## SORTTITLE : string -

Sorttitle meta directive. See https://chordpro.org/chordpro/directives-sorttitle/

+##### Returns -**Kind**: global constant - +`string` -## START\_OF\_ABC : string -

Start of ABC music notation section See https://chordpro.org/chordpro/directives-env_abc/

+#### fontStyleTag() -**Kind**: global constant - +> **fontStyleTag**: (`font`) => `string` -## START\_OF\_BRIDGE : string -

Start of bridge directive. See https://chordpro.org/chordpro/directives-env_bridge/

+##### Parameters -**Kind**: global constant - +• **font**: `Font` -## START\_OF\_CHORUS : string -

Start of chorus directive. See https://www.chordpro.org/chordpro/directives-env_chorus/

+##### Returns -**Kind**: global constant - +`string` -## START\_OF\_GRID : string -

Start of grid directive. See https://www.chordpro.org/chordpro/directives-env_grid/

+#### hasChordContents() -**Kind**: global constant - +> **hasChordContents**: (`line`) => `boolean` -## START\_OF\_LY : string -

Start of Lilypond music notation section See https://chordpro.org/chordpro/directives-env_ly/

+##### Parameters -**Kind**: global constant - +• **line**: [`Line`](#classeslinemd) -## START\_OF\_TAB : string -

Start of tab directive. See https://www.chordpro.org/chordpro/directives-env_tab/

+##### Returns -**Kind**: global constant - +`boolean` -## START\_OF\_VERSE : string -

Start of verse directive. See https://www.chordpro.org/chordpro/directives-env_verse/

+#### hasTextContents() -**Kind**: global constant - +> **hasTextContents**: (`line`) => `boolean` -## SUBTITLE : string -

Subtitle meta directive. See https://www.chordpro.org/chordpro/directives-subtitle/

+##### Parameters -**Kind**: global constant - +• **line**: [`Line`](#classeslinemd) -## TEMPO : string -

Tempo meta directive. See https://www.chordpro.org/chordpro/directives-tempo/

+##### Returns -**Kind**: global constant - +`boolean` -## TIME : string -

Time meta directive. See https://www.chordpro.org/chordpro/directives-time/

+#### isChordLyricsPair() -**Kind**: global constant - +> **isChordLyricsPair**: (`item`) => `boolean` -## TITLE : string -

Title meta directive. See https://www.chordpro.org/chordpro/directives-title/

+##### Parameters -**Kind**: global constant - +• **item**: `Item` -## TRANSPOSE : string -

Transpose meta directive. See: https://www.chordpro.org/chordpro/directives-transpose/

+##### Returns -**Kind**: global constant - +`boolean` -## NEW\_KEY : string -

New Key meta directive. See: https://github.com/PraiseCharts/ChordChartJS/issues/53

+#### isComment() -**Kind**: global constant - +> **isComment**: (`item`) => `boolean` -## YEAR : string -

Year meta directive. See https://www.chordpro.org/chordpro/directives-year/

+##### Parameters -**Kind**: global constant - +• **item**: [`Tag`](#classestagmd) -## CHORDFONT : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_chord_legacy/

+##### Returns -**Kind**: global constant - +`boolean` -## CHORDSIZE : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_chord_legacy/

+#### isEvaluatable() -**Kind**: global constant - +> **isEvaluatable**: (`item`) => `boolean` -## CHORDCOLOUR : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_chord_legacy/

+##### Parameters -**Kind**: global constant - +• **item**: `Item` -## TEXTFONT : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_text_legacy/

+##### Returns -**Kind**: global constant - +`boolean` -## TEXTSIZE : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_text_legacy/

+#### isTag() -**Kind**: global constant - +> **isTag**: (`item`) => `boolean` -## TEXTCOLOUR : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_text_legacy/

+##### Parameters -**Kind**: global constant - +• **item**: `Item` -## TITLEFONT : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_title_legacy/

+##### Returns -**Kind**: global constant - +`boolean` -## TITLESIZE : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_title_legacy/

+#### lineClasses() -**Kind**: global constant - +> **lineClasses**: (`line`) => `string` -## TITLECOLOUR : string -

Chordfont directive. See https://www.chordpro.org/chordpro/directives-props_title_legacy/

+##### Parameters -**Kind**: global constant - +• **line**: [`Line`](#classeslinemd) -## CHORUS : string -

Chorus directive. Support repeating an earlier defined section. -See https://www.chordpro.org/chordpro/directives-env_chorus/

+##### Returns -**Kind**: global constant - +`string` -## CHORD\_STYLE : string -

Chord type directive. Determines the type of chords used in the rendered chord sheet. -Possible values are 'solfege', 'symbol', 'numeral' and 'number'

+#### lineHasContents() -**Kind**: global constant -**See**: https://github.com/bettermusic/ChordSheetJS/issues/352 - +> **lineHasContents**: (`line`) => `boolean` -## BRIDGE : string -

Used to mark a paragraph as bridge

+##### Parameters -**Kind**: global constant - +• **line**: [`Line`](#classeslinemd) -## CHORUS : string -

Used to mark a paragraph as chorus

+##### Returns -**Kind**: global constant - +`boolean` -## GRID : string -

Used to mark a paragraph as grid

+#### paragraphClasses() -**Kind**: global constant - +> **paragraphClasses**: (`paragraph`) => `string` -## INDETERMINATE : string -

Used to mark a paragraph as containing lines with both verse and chorus type

+##### Parameters -**Kind**: global constant - +• **paragraph**: [`Paragraph`](#classesparagraphmd) -## NONE : string -

Used to mark a paragraph as not containing a line marked with a type

+##### Returns -**Kind**: global constant - +`string` -## TAB : string -

Used to mark a paragraph as tab

+#### renderChord() -**Kind**: global constant - +> **renderChord**: (`chordString`, `line`, `song`, `__namedParameters`) => `string` -## VERSE : string -

Used to mark a paragraph as verse

+##### Parameters -**Kind**: global constant - +• **chordString**: `string` -## LILYPOND : string -

Used to mark a section as Lilypond notation

+• **line**: [`Line`](#classeslinemd) -**Kind**: global constant - +• **song**: [`Song`](#classessongmd) -## ABC : string -

Used to mark a section as ABC music notation

+• **\_\_namedParameters**: `RenderChordOptions` = `{}` -**Kind**: global constant - +##### Returns -## scopedCss(scope) ⇒ string -

Generates basic CSS, scoped within the provided selector, to use with output generated by [HtmlTableFormatter](#HtmlTableFormatter)

+`string` -**Kind**: global function -**Returns**: string -

the CSS string

+#### stripHTML() -| Param | Description | -| --- | --- | -| scope |

the CSS scope to use, for example .chordSheetViewer

| +> **stripHTML**: (`string`) => `string` - +##### Parameters -## scopedCss(scope) ⇒ string -

Generates basic CSS, scoped within the provided selector, to use with output generated by [HtmlTableFormatter](#HtmlTableFormatter)

+• **string**: `string` -**Kind**: global function -**Returns**: string -

the CSS string

+##### Returns -| Param | Description | -| --- | --- | -| scope |

the CSS scope to use, for example .chordSheetViewer

| +`string` - +#### when() -## getCapos(key) ⇒ Object.<string, string> -

Returns applicable capos for the provided key

+> **when**: (`condition`, `callback`?) => `When` -**Kind**: global function -**Returns**: Object.<string, string> -

The available capos, where the keys are capo numbers and the -values are the effective key for that capo.

+##### Parameters -| Param | Type | Description | -| --- | --- | --- | -| key | [Key](#Key) \| string |

The key to get capos for

| +• **condition**: `any` - +• **callback?**: `WhenCallback` -## getKeys(key) ⇒ Array.<string> -

Returns applicable keys to transpose to from the provided key

+##### Returns -**Kind**: global function -**Returns**: Array.<string> -

The available keys

+`When` -| Param | Type | Description | -| --- | --- | --- | -| key | [Key](#Key) \| string |

The key to get keys for

| +### Defined in +[template\_helpers.ts:98](https://github.com/martijnversluis/ChordSheetJS/blob/72d2652c124ffd35b317b03359949c78f5832c8b/src/template_helpers.ts#L98) diff --git a/jsdoc2md.json b/jsdoc2md.json deleted file mode 100644 index 5dff5765..00000000 --- a/jsdoc2md.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "source": { - "includePattern": ".+\\.ts(doc|x)?$", - "excludePattern": ".+\\.(test|spec).ts" - }, - "plugins": [ - "plugins/markdown", - "node_modules/jsdoc-babel" - ], - "babel": { - "extensions": ["ts", "tsx"], - "ignore": ["**/*.(test|spec).ts"], - "babelrc": false, - "presets": [["@babel/preset-env", { "targets": { "node": true } }], "@babel/preset-typescript"], - "plugins": ["@babel/transform-class-properties", "@babel/transform-object-rest-spread"] - } -} diff --git a/package.json b/package.json index fe4bc848..9d405df4 100644 --- a/package.json +++ b/package.json @@ -28,22 +28,16 @@ "node": ">=16" }, "devDependencies": { - "@babel/cli": "^7.17.6", - "@babel/core": "^7.17.9", - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-proposal-object-rest-spread": "^7.17.3", - "@babel/preset-env": "^7.16.11", - "@babel/preset-typescript": "^7.16.7", "@eslint/core": "^0.9.0", "@eslint/js": "^9.11.0", - "@martijnversluis/unibuild": "^1.1.0", + "@martijnversluis/unibuild": "1.2.2", "@parcel/packager-ts": "2.13.0", "@parcel/transformer-typescript-types": "2.13.0", "@types/eslint__js": "^8.42.3", "@types/jest": "^27.4.1", "@types/lodash.get": "^4.4.7", "@types/node": "^22.0.0", + "concat-md": "^0.5.1", "detect-newline": "^4.0.1", "esbuild": "^0.24.0", "eslint": "^9.11.0", @@ -52,8 +46,6 @@ "globals": "^15.9.0", "husky": "^9.0.11", "jest": "^27.0.1", - "jsdoc-babel": "^0.5.0", - "jsdoc-to-markdown": "^9.0.5", "parcel": "2.13.0", "peggy": "^4.0.2", "pegjs-backtrace": "^0.2.1", @@ -67,6 +59,8 @@ "ts-pegjs": "^3.0.0", "tsc": "^2.0.4", "tsx": "^4.10.5", + "typedoc": "^0.26.11", + "typedoc-plugin-markdown": "^4.2.10", "typescript": "^5.6.2", "typescript-eslint": "^8.6.0" }, @@ -78,6 +72,7 @@ "postpublish": "pinst --enable", "prepare": "husky install", "prepublish": "pinst --disable && yarn install && yarn test && yarn build:release", + "readme": "yarn unibuild build readme -f", "test": "yarn unibuild lint && yarn unibuild test", "unibuild": "tsx ./unibuild.ts" }, diff --git a/test/cloneable_stub.ts b/test/cloneable_stub.ts index 39d1b41a..6f12dc59 100644 --- a/test/cloneable_stub.ts +++ b/test/cloneable_stub.ts @@ -1,5 +1,7 @@ export default class CloneableStub { - constructor(value) { + value: any; + + constructor(value: any) { this.value = value; } diff --git a/unibuild.ts b/unibuild.ts index 97d90695..92ae18e9 100755 --- a/unibuild.ts +++ b/unibuild.ts @@ -10,7 +10,9 @@ import buildChordSuffixGrammar from './script/build_chord_suffix_grammar'; import buildScales from './script/build_scales'; import buildChordProSectionGrammar from './script/build_chord_pro_section_grammar'; -const { main, types, bundle } = packageJSON; +const { + main, source, types, bundle, +} = packageJSON; interface BuildOptions { force: boolean; @@ -94,6 +96,20 @@ unibuild((u: Builder) => { chordsOverWordsParser, ]; + u.asset('readme', { + input: ['INTRO.md', 'src', ...codeGeneratedAssets], + outfile: 'README.md', + command: ({ input: [intro], outfile }) => { + const tmpDir = 'tmp/docs'; + return [ + `typedoc --plugin typedoc-plugin-markdown --out ${tmpDir} ${source} --logLevel Error`, + `cat ${intro} > ${outfile}`, + `concat-md --decrease-title-levels --dir-name-as-title ${tmpDir} >> ${outfile}`, + `rm -rf ${tmpDir}`, + ]; + }, + }); + const jsBuild = u.asset('sources', { input: codeGeneratedAssets, outfile: main, @@ -120,14 +136,6 @@ unibuild((u: Builder) => { releaseOnly: true, }); - u.asset('readme', { - input: ['doc/README.hbs', './jsdoc2md.json', 'src/'], - outfile: 'README.md', - command: ({ input: [template, config], outfile }) => ( - `jsdoc2md -f src/**/*.ts -f src/*.ts --configure ${config} --template ${template} > ${outfile}` - ), - }); - u.lint('checkTypes', { requires: jsBuild, command: `tsc ${types}`, diff --git a/yarn.lock b/yarn.lock index c0a564af..7c18e236 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,33 +15,6 @@ __metadata: languageName: node linkType: hard -"@babel/cli@npm:^7.17.6": - version: 7.25.9 - resolution: "@babel/cli@npm:7.25.9" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.25" - "@nicolo-ribaudo/chokidar-2": "npm:2.1.8-no-fsevents.3" - chokidar: "npm:^3.6.0" - commander: "npm:^6.2.0" - convert-source-map: "npm:^2.0.0" - fs-readdir-recursive: "npm:^1.1.0" - glob: "npm:^7.2.0" - make-dir: "npm:^2.1.0" - slash: "npm:^2.0.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - dependenciesMeta: - "@nicolo-ribaudo/chokidar-2": - optional: true - chokidar: - optional: true - bin: - babel: ./bin/babel.js - babel-external-helpers: ./bin/babel-external-helpers.js - checksum: 10c0/2e8228c3715e220fa902888c643ce1a89c4ee90be3d9f7a31218d5bb2500456e0cef12cb90fd5877ab3e5a4498df8f27670425d346422a3eb52052fd3184d520 - languageName: node - linkType: hard - "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.2": version: 7.24.2 resolution: "@babel/code-frame@npm:7.24.2" @@ -73,13 +46,6 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5": - version: 7.24.4 - resolution: "@babel/compat-data@npm:7.24.4" - checksum: 10c0/9cd8a9cd28a5ca6db5d0e27417d609f95a8762b655e8c9c97fd2de08997043ae99f0139007083c5e607601c6122e8432c85fe391731b19bf26ad458fa0c60dd3 - languageName: node - linkType: hard - "@babel/compat-data@npm:^7.25.9": version: 7.25.9 resolution: "@babel/compat-data@npm:7.25.9" @@ -87,14 +53,7 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.26.0": - version: 7.26.2 - resolution: "@babel/compat-data@npm:7.26.2" - checksum: 10c0/c9b5f3724828d17f728a778f9d66c19b55c018d0d76de6d731178cca64f182c22b71400a73bf2b65dcc4fcfe52b630088a94d5902911b54206aa90e3ffe07d12 - languageName: node - linkType: hard - -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.17.9, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": version: 7.26.0 resolution: "@babel/core@npm:7.26.0" dependencies: @@ -154,47 +113,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-annotate-as-pure@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10c0/e413cd022e1e21232c1ce98f3e1198ec5f4774c7eceb81155a45f9cb6d8481f3983c52f83252309856668e728c751f0340d29854b604530a694899208df6bcc3 - languageName: node - linkType: hard - -"@babel/helper-annotate-as-pure@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - checksum: 10c0/095b6ba50489d797733abebc4596a81918316a99e3632755c9f02508882912b00c2ae5e468532a25a5c2108d109ddbe9b7da78333ee7cc13817fc50c00cf06fe - languageName: node - linkType: hard - -"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/a6068bb813e7f72d12b72edeecb99167f60cd7964cacedfb60e01fff5e7bed4a5a7f4f7414de7cf352a1b71487df5f8dab8c2b5230de4ad5aea16adf32e14219 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.6": - version: 7.23.6 - resolution: "@babel/helper-compilation-targets@npm:7.23.6" - dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-validator-option": "npm:^7.23.5" - browserslist: "npm:^4.22.2" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10c0/ba38506d11185f48b79abf439462ece271d3eead1673dd8814519c8c903c708523428806f05f2ec5efd0c56e4e278698fac967e5a4b5ee842c32415da54bc6fa - languageName: node - linkType: hard - "@babel/helper-compilation-targets@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-compilation-targets@npm:7.25.9" @@ -208,102 +126,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-create-class-features-plugin@npm:7.18.6" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.18.6" - "@babel/helper-environment-visitor": "npm:^7.18.6" - "@babel/helper-function-name": "npm:^7.18.6" - "@babel/helper-member-expression-to-functions": "npm:^7.18.6" - "@babel/helper-optimise-call-expression": "npm:^7.18.6" - "@babel/helper-replace-supers": "npm:^7.18.6" - "@babel/helper-split-export-declaration": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/ecd5d62c7a2bc8014fff9aa03c78a839e8736b5a756bb7f3e6d9d086bf298d7128bee1ee1262229b1b1dcaea9c57a504709c951560a45c7b65897326b88456a6 - languageName: node - linkType: hard - -"@babel/helper-create-class-features-plugin@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-create-class-features-plugin@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-member-expression-to-functions": "npm:^7.25.9" - "@babel/helper-optimise-call-expression": "npm:^7.25.9" - "@babel/helper-replace-supers": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/b2bdd39f38056a76b9ba00ec5b209dd84f5c5ebd998d0f4033cf0e73d5f2c357fbb49d1ce52db77a2709fb29ee22321f84a5734dc9914849bdfee9ad12ce8caf - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.18.6" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.18.6" - regexpu-core: "npm:^5.1.0" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/5151ae268376d9cd9a5fd97263dc2cf21f2c5043076331c9d0b4e4d7bbf8ae83ed1b0d366c5ddcb17c06329f9ed38e10e75b1dbc2dc040bbfab7d5604eada886 - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - regexpu-core: "npm:^6.1.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/3adc60a758febbf07d65a15eaccab1f7b9fcc55e7141e59122f13c9f81fc0d1cce4525b7f4af50285d27c93b34c859fd2c39c39820c5fb92211898c3bbdc77ef - languageName: node - linkType: hard - -"@babel/helper-define-polyfill-provider@npm:^0.6.1": - version: 0.6.1 - resolution: "@babel/helper-define-polyfill-provider@npm:0.6.1" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/210e1c8ac118f7c5a0ef5b42c4267c3db2f59b1ebc666a275d442b86896de4a66ef93539d702870f172f9749cd44c89f53056a5b17e619c3142b12ed4e4e6aae - languageName: node - linkType: hard - -"@babel/helper-define-polyfill-provider@npm:^0.6.2": - version: 0.6.2 - resolution: "@babel/helper-define-polyfill-provider@npm:0.6.2" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/f777fe0ee1e467fdaaac059c39ed203bdc94ef2465fb873316e9e1acfc511a276263724b061e3b0af2f6d7ad3ff174f2bb368fde236a860e0f650fda43d7e022 - languageName: node - linkType: hard - -"@babel/helper-environment-visitor@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-environment-visitor@npm:7.18.6" - checksum: 10c0/080be34c983814b171911c941900636d970955f1aecfe0d5875fbe271185dc161047779a881c87a5c945fa412a45ed33510bc41b2695984b1e0b2ac5f3ed9733 - languageName: node - linkType: hard - "@babel/helper-environment-visitor@npm:^7.22.20": version: 7.22.20 resolution: "@babel/helper-environment-visitor@npm:7.22.20" @@ -311,16 +133,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-function-name@npm:7.18.6" - dependencies: - "@babel/template": "npm:^7.18.6" - "@babel/types": "npm:^7.18.6" - checksum: 10c0/bf03b7cb79b98502251d727b8803b0ee6e22c806c76656df1a057d405d913acbe4b39d075097ee0987f7ae960b8da6059dd5102f82b2fe0271ba5d071b0a5ef9 - languageName: node - linkType: hard - "@babel/helper-function-name@npm:^7.23.0": version: 7.23.0 resolution: "@babel/helper-function-name@npm:7.23.0" @@ -331,15 +143,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-get-function-arity@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-get-function-arity@npm:7.16.7" - dependencies: - "@babel/types": "npm:^7.16.7" - checksum: 10c0/e1bca6793a77144f023af577e8761cab096d5945c4081c54841f58724ae9f5009c1d91603afd266f0f4d279c94bae9430cf029d04445dabd46b1f2e7bc165419 - languageName: node - linkType: hard - "@babel/helper-hoist-variables@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-hoist-variables@npm:7.22.5" @@ -349,25 +152,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-member-expression-to-functions@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10c0/6114c586c82f37ddb47b52a795b0d6920e1ba3e29c83b59c93b48179c5cef96e3de13d289f6f65610953fcd25505482bdc27afa06e8280969dcba71bb0699401 - languageName: node - linkType: hard - -"@babel/helper-member-expression-to-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/e08c7616f111e1fb56f398365e78858e26e466d4ac46dff25921adc5ccae9b232f66e952a2f4162bbe336627ba336c7fd9eca4835b6548935973d3380d77eaff - languageName: node - linkType: hard - "@babel/helper-module-imports@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-module-imports@npm:7.25.9" @@ -378,20 +162,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-module-transforms@npm:7.25.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-simple-access": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/cd005e7585806845d79c5c0ca9e8926f186b430b0a558dad08a3611365eaad3ac587672b0d903530117dec454f48b6bdc3d164b19ea1b71ca1b4eb3be7b452ef - languageName: node - linkType: hard - "@babel/helper-module-transforms@npm:^7.26.0": version: 7.26.0 resolution: "@babel/helper-module-transforms@npm:7.26.0" @@ -405,106 +175,13 @@ __metadata: languageName: node linkType: hard -"@babel/helper-optimise-call-expression@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-optimise-call-expression@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10c0/f1352ebc5d9abae6088e7d9b4b6b445c406ba552ef61e967ec77d005ff65752265b002b6faaf16cc293f9e37753760ef05c1f4b26cda1039256917022ba5669c - languageName: node - linkType: hard - -"@babel/helper-optimise-call-expression@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - checksum: 10c0/90203e6607edeadd2a154940803fd616c0ed92c1013d6774c4b8eb491f1a5a3448b68faae6268141caa5c456e55e3ee49a4ed2bd7ddaf2365daea321c435914c - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.5, @babel/helper-plugin-utils@npm:^7.8.0": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.16.7, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.24.5 resolution: "@babel/helper-plugin-utils@npm:7.24.5" checksum: 10c0/4ae40094e6a2f183281213344f4df60c66b16b19a2bc38d2bb11810a6dc0a0e7ec638957d0e433ff8b615775b8f3cd1b7edbf59440d1b50e73c389fc22913377 languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-plugin-utils@npm:7.25.9" - checksum: 10c0/483066a1ba36ff16c0116cd24f93de05de746a603a777cd695ac7a1b034928a65a4ecb35f255761ca56626435d7abdb73219eba196f9aa83b6c3c3169325599d - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-remap-async-to-generator@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-wrap-function": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/6798b562f2788210980f29c5ee96056d90dc73458c88af5bd32f9c82e28e01975588aa2a57bb866c35556bd9b76bac937e824ee63ba472b6430224b91b4879e9 - languageName: node - linkType: hard - -"@babel/helper-replace-supers@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-replace-supers@npm:7.18.6" - dependencies: - "@babel/helper-environment-visitor": "npm:^7.18.6" - "@babel/helper-member-expression-to-functions": "npm:^7.18.6" - "@babel/helper-optimise-call-expression": "npm:^7.18.6" - "@babel/traverse": "npm:^7.18.6" - "@babel/types": "npm:^7.18.6" - checksum: 10c0/2a7e8e4d8eab4994929a12bdd7fe3609b5c526c39e87885074e5b122c3f0d3714274dd8fa3eafe4bb2fd95dce1b0eead7710051bce5fbbefe09225ae534cc94b - languageName: node - linkType: hard - -"@babel/helper-replace-supers@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-replace-supers@npm:7.25.9" - dependencies: - "@babel/helper-member-expression-to-functions": "npm:^7.25.9" - "@babel/helper-optimise-call-expression": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/0b40d7d2925bd3ba4223b3519e2e4d2456d471ad69aa458f1c1d1783c80b522c61f8237d3a52afc9e47c7174129bbba650df06393a6787d5722f2ec7f223c3f4 - languageName: node - linkType: hard - -"@babel/helper-simple-access@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-simple-access@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/3f1bcdb88ee3883ccf86959869a867f6bbf8c4737cd44fb9f799c38e54f67474590bc66802500ae9fe18161792875b2cfb7ec15673f48ed6c8663f6d09686ca8 - languageName: node - linkType: hard - -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/09ace0c6156961624ac9524329ce7f45350bab94bbe24335cbe0da7dfaa1448e658771831983cb83fe91cf6635b15d0a3cab57c03b92657480bfb49fb56dd184 - languageName: node - linkType: hard - -"@babel/helper-split-export-declaration@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/helper-split-export-declaration@npm:7.18.6" - dependencies: - "@babel/types": "npm:^7.18.6" - checksum: 10c0/1335b510a9aefcbf60d89648e622715774e56040d72302dc5e176c8d837c9ab81414ccfa9ed771a9f98da7192579bb12ab7a95948bfdc69b03b4a882b3983e48 - languageName: node - linkType: hard - "@babel/helper-split-export-declaration@npm:^7.24.5": version: 7.24.5 resolution: "@babel/helper-split-export-declaration@npm:7.24.5" @@ -528,1152 +205,243 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-validator-identifier@npm:7.24.5" - checksum: 10c0/05f957229d89ce95a137d04e27f7d0680d84ae48b6ad830e399db0779341f7d30290f863a93351b4b3bde2166737f73a286ea42856bb07c8ddaa95600d38645c - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-identifier@npm:7.25.9" - checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/helper-validator-option@npm:7.23.5" - checksum: 10c0/af45d5c0defb292ba6fd38979e8f13d7da63f9623d8ab9ededc394f67eb45857d2601278d151ae9affb6e03d5d608485806cd45af08b4468a0515cf506510e94 - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-option@npm:7.25.9" - checksum: 10c0/27fb195d14c7dcb07f14e58fe77c44eea19a6a40a74472ec05c441478fa0bb49fa1c32b2d64be7a38870ee48ef6601bdebe98d512f0253aea0b39756c4014f3e - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-wrap-function@npm:7.25.9" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/b6627d83291e7b80df020f8ee2890c52b8d49272962cac0114ef90f189889c90f1027985873d1b5261a4e986e109b2754292dc112392f0b1fcbfc91cc08bd003 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/helpers@npm:7.26.0" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - checksum: 10c0/343333cced6946fe46617690a1d0789346960910225ce359021a88a60a65bc0d791f0c5d240c0ed46cf8cc63b5fd7df52734ff14e43b9c32feae2b61b1647097 - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/highlight@npm:7.24.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.22.20" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/98ce00321daedeed33a4ed9362dc089a70375ff1b3b91228b9f05e6591d387a81a8cba68886e207861b8871efa0bc997ceabdd9c90f6cce3ee1b2f7f941b42db - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/highlight@npm:7.25.9" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/ae0ed93c151b85a07df42936117fa593ce91563a22dfc8944a90ae7088c9679645c33e00dcd20b081c1979665d65f986241172dae1fc9e5922692fc3ff685a49 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/parser@npm:7.24.5" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/8333a6ad5328bad34fa0e12bcee147c3345ea9a438c0909e7c68c6cfbea43c464834ffd7eabd1cbc1c62df0a558e22ffade9f5b29440833ba7b33d96a71f88c0 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.20.15": - version: 7.25.0 - resolution: "@babel/parser@npm:7.25.0" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/4aecf13829fa6f4a66835429bd235458544d9cd14374b17c19bc7726f472727ca33f500e51e1298ddc72db93bdd77fcaa9ddc095200b0b792173069e6cf9742e - languageName: node - linkType: hard - -"@babel/parser@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/parser@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/143faff8a72331be5ed94080e0f4645cbeea814fb488cd9210154083735f67cb66fde32f6a4a80efd6c4cdf12c6f8b50995a465846093c7f65c5da8d7829627c - languageName: node - linkType: hard - -"@babel/parser@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/parser@npm:7.26.0" - dependencies: - "@babel/types": "npm:^7.26.0" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/05619e239be811f4d8a9f471534c0d7dbc44faf38f6a6445663710982d2f9b057be43b4d18906d4e28830958752bdadbf88903abf687304a2bda86c4b3489455 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/7aab47fcbb8c1ddc195a3cd66609edcad54c5022f018db7de40185f0182950389690e953e952f117a1737b72f665ff02ad30de6c02b49b97f1d8f4ccdffedc34 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/3a652b3574ca62775c5f101f8457950edc540c3581226579125da535d67765f41ad7f0e6327f8efeb2540a5dad5bb0c60a89fb934af3f67472e73fb63612d004 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/18fc9004104a150f9f5da9f3307f361bc3104d16778bb593b7523d5110f04a8df19a2587e6bdd5e726fb1d397191add45223f4f731bb556c33f14f2779d596e8 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10c0/3f6c8781a2f7aa1791a31d2242399ca884df2ab944f90c020b6f112fb19f05fa6dad5be143d274dad1377e40415b63d24d5489faf5060b9c4a99e55d8f0c317c - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/02b365f0cc4df8b8b811c68697c93476da387841e5f153fe42766f34241b685503ea51110d5ed6df7132759820b93e48d9fa3743cffc091eed97c19f7e5fe272 - languageName: node - linkType: hard - -"@babel/plugin-proposal-class-properties@npm:^7.16.7": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d5172ac6c9948cdfc387e94f3493ad86cb04035cf7433f86b5d358270b1b9752dc25e176db0c5d65892a246aca7bdb4636672e15626d7a7de4bc0bd0040168d9 - languageName: node - linkType: hard - -"@babel/plugin-proposal-object-rest-spread@npm:^7.17.3": - version: 7.20.7 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" - dependencies: - "@babel/compat-data": "npm:^7.20.5" - "@babel/helper-compilation-targets": "npm:^7.20.7" - "@babel/helper-plugin-utils": "npm:^7.20.2" - "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" - "@babel/plugin-transform-parameters": "npm:^7.20.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b9818749bb49d8095df64c45db682448d04743d96722984cbfd375733b2585c26d807f84b4fdb28474f2d614be6a6ffe3d96ffb121840e9e5345b2ccc0438bd8 - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": - version: 7.21.0-placeholder-for-preset-env.2 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e605e0070da087f6c35579499e65801179a521b6842c15181a1e305c04fded2393f11c1efd09b087be7f8b083d1b75e8f3efcbc1292b4f60d3369e14812cff63 - languageName: node - linkType: hard - -"@babel/plugin-syntax-async-generators@npm:^7.8.4": - version: 7.8.4 - resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d13efb282838481348c71073b6be6245b35d4f2f964a8f71e4174f235009f929ef7613df25f8d2338e2d3e44bc4265a9f8638c6aaa136d7a61fe95985f9725c8 - languageName: node - linkType: hard - -"@babel/plugin-syntax-bigint@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/686891b81af2bc74c39013655da368a480f17dd237bf9fbc32048e5865cb706d5a8f65438030da535b332b1d6b22feba336da8fa931f663b6b34e13147d12dde - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-properties@npm:^7.8.3": - version: 7.12.13 - resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.12.13" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/95168fa186416195280b1264fb18afcdcdcea780b3515537b766cb90de6ce042d42dd6a204a39002f794ae5845b02afb0fd4861a3308a861204a55e68310a120 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.26.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/525b174e60b210d96c1744c1575fc2ddedcc43a479cba64a5344cf77bd0541754fc58120b5a11ff832ba098437bb05aa80900d1f49bb3d888c5e349a4a3a356e - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.26.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e594c185b12bfe0bbe7ca78dfeebe870e6d569a12128cac86f3164a075fe0ff70e25ddbd97fd0782906b91f65560c9dc6957716b7b4a68aba2516c9b7455e352 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-meta@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0b08b5e4c3128523d8e346f8cfc86824f0da2697b1be12d71af50a31aff7a56ceb873ed28779121051475010c28d6146a6bfea8518b150b71eeb4e46190172ee - languageName: node - linkType: hard - -"@babel/plugin-syntax-json-strings@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e98f31b2ec406c57757d115aac81d0336e8434101c224edd9a5c93cefa53faf63eacc69f3138960c8b25401315af03df37f68d316c151c4b933136716ed6906e - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d56597aff4df39d3decda50193b6dfbe596ca53f437ff2934622ce19a743bf7f43492d3fb3308b0289f5cee2b825d99ceb56526a2b9e7b68bf04901546c5618c - languageName: node - linkType: hard - -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2594cfbe29411ad5bc2ad4058de7b2f6a8c5b86eda525a993959438615479e59c012c14aec979e538d60a584a1a799b60d1b8942c3b18468cb9d99b8fd34cd0b - languageName: node - linkType: hard - -"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2024fbb1162899094cfc81152449b12bd0cc7053c6d4bda8ac2852545c87d0a851b1b72ed9560673cbf3ef6248257262c3c04aabf73117215c1b9cc7dd2542ce - languageName: node - linkType: hard - -"@babel/plugin-syntax-numeric-separator@npm:^7.8.3": - version: 7.10.4 - resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.10.4" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c55a82b3113480942c6aa2fcbe976ff9caa74b7b1109ff4369641dfbc88d1da348aceb3c31b6ed311c84d1e7c479440b961906c735d0ab494f688bf2fd5b9bb9 - languageName: node - linkType: hard - -"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ee1eab52ea6437e3101a0a7018b0da698545230015fc8ab129d292980ec6dff94d265e9e90070e8ae5fed42f08f1622c14c94552c77bcac784b37f503a82ff26 - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/27e2493ab67a8ea6d693af1287f7e9acec206d1213ff107a928e85e173741e1d594196f99fec50e9dde404b09164f39dec5864c767212154ffe1caa6af0bc5af - languageName: node - linkType: hard - -"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.8.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/46edddf2faa6ebf94147b8e8540dfc60a5ab718e2de4d01b2c0bdf250a4d642c2bd47cbcbb739febcb2bf75514dbcefad3c52208787994b8d0f8822490f55e81 - languageName: node - linkType: hard - -"@babel/plugin-syntax-top-level-await@npm:^7.8.3": - version: 7.14.5 - resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.14.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-syntax-typescript@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5192ebe11bd46aea68b7a60fd9555465c59af7e279e71126788e59121b86e00b505816685ab4782abe159232b0f73854e804b54449820b0d950b397ee158caa2 - languageName: node - linkType: hard - -"@babel/plugin-syntax-typescript@npm:^7.7.2": - version: 7.16.7 - resolution: "@babel/plugin-syntax-typescript@npm:7.16.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.16.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8eb1dbc06511035293d1af8172be5edec8d80e1a5c908258a1abd4fccb18879cdbae31e8ff813b310e4598a0a5484ebe0b686d50a0e820c17ed518bdca8c1af9 - languageName: node - linkType: hard - -"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/9144e5b02a211a4fb9a0ce91063f94fbe1004e80bde3485a0910c9f14897cf83fabd8c21267907cff25db8e224858178df0517f14333cfcf3380ad9a4139cb50 - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/851fef9f58be60a80f46cc0ce1e46a6f7346a6f9d50fa9e0fa79d46ec205320069d0cc157db213e2bea88ef5b7d9bd7618bb83f0b1996a836e2426c3a3a1f622 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-remap-async-to-generator": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e3fcb9fc3d6ab6cbd4fcd956b48c17b5e92fe177553df266ffcd2b2c1f2f758b893e51b638e77ed867941e0436487d2b8b505908d615c41799241699b520dec6 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.25.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-remap-async-to-generator": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c443d9e462ddef733ae56360064f32fc800105803d892e4ff32d7d6a6922b3765fa97b9ddc9f7f1d3f9d8c2d95721d85bef9dbf507804214c6cf6466b105c168 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e92ba0e3d72c038513844d8fca1cc8437dcb35cd42778e97fd03cb8303380b201468611e7ecfdcae3de33473b2679fe2de1552c5f925d112c5693425cf851f10 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-block-scoping@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a76e30becb6c75b4d87a2cd53556fddb7c88ddd56bfadb965287fd944810ac159aa8eb5705366fc37336041f63154ed9fab3862fb10482a45bf5ede63fd55fda - languageName: node - linkType: hard - -"@babel/plugin-transform-class-properties@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-class-properties@npm:7.25.9" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f0603b6bd34d8ba62c03fc0572cb8bbc75874d097ac20cc7c5379e001081210a84dba1749e7123fca43b978382f605bb9973c99caf2c5b4c492d5c0a4a441150 - languageName: node - linkType: hard - -"@babel/plugin-transform-class-static-block@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-transform-class-static-block@npm:7.26.0" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10c0/cdcf5545ae6514ed75fbd73cccfa209c6a5dfdf0c2bb7bb62c0fb4ec334a32281bcf1bc16ace494d9dbe93feb8bdc0bd3cf9d9ccb6316e634a67056fa13b741b - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-classes@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-replace-supers": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/02742ea7cd25be286c982e672619effca528d7a931626a6f3d6cea11852951b7ee973276127eaf6418ac0e18c4d749a16b520709c707e86a67012bd23ff2927d - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-computed-properties@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/template": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/948c0ae3ce0ba2375241d122a9bc7cda4a7ac8110bd8a62cd804bc46a5fdb7a7a42c7799c4cd972e14e0a579d2bd0999b92e53177b73f240bb0d4b09972c758b - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-destructuring@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7beec5fda665d108f69d5023aa7c298a1e566b973dd41290faa18aeea70f6f571295c1ece0a058f3ceb6c6c96de76de7cd34f5a227fbf09a1b8d8a735d28ca49 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7c3471ae5cf7521fd8da5b03e137e8d3733fc5ee4524ce01fb0c812f0bb77cb2c9657bc8a6253186be3a15bb4caa8974993c7ddc067f554ecc6a026f0a3b5e12 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d0c74894b9bf6ff2a04189afffb9cd43d87ebd7b7943e51a827c92d2aaa40fa89ac81565a2fd6fbeabf9e38413a9264c45862eee2b017f1d49046cc3c8ff06b4 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/a8039a6d2b90e011c7b30975edee47b5b1097cf3c2f95ec1f5ddd029898d783a995f55f7d6eb8d6bb8873c060fb64f9f1ccba938dfe22d118d09cf68e0cd3bf6 - languageName: node - linkType: hard - -"@babel/plugin-transform-dynamic-import@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5e643a8209072b668350f5788f23c64e9124f81f958b595c80fecca6561086d8ef346c04391b9e5e4cad8b8cbe22c258f0cd5f4ea89b97e74438e7d1abfd98cf - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.25.9" - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/3b42f65bab3fee28c385115ce6bcb6ba544dff187012df408a432c9fb44c980afd898911020c723dc1c9257aaf3d7d0131ad83ba15102bf30ad9a86fc2a8a912 - languageName: node - linkType: hard - -"@babel/plugin-transform-export-namespace-from@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f291ea2ec5f36de9028a00cbd5b32f08af281b8183bf047200ff001f4cb260be56f156b2449f42149448a4a033bd6e86a3a7f06d0c2825532eb0ae6b03058dfb - languageName: node - linkType: hard - -"@babel/plugin-transform-for-of@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-for-of@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/bf11abc71934a1f369f39cd7a33cf3d4dc5673026a53f70b7c1238c4fcc44e68b3ca1bdbe3db2076f60defb6ffe117cbe10b90f3e1a613b551d88f7c4e693bbe - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-function-name@npm:7.25.9" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8e67fbd1dd367927b8b6afdf0a6e7cb3a3fd70766c52f700ca77428b6d536f6c9d7ec643e7762d64b23093233765c66bffa40e31aabe6492682879bcb45423e1 - languageName: node - linkType: hard - -"@babel/plugin-transform-json-strings@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-json-strings@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/00bc2d4751dfc9d44ab725be16ee534de13cfd7e77dfb386e5dac9e48101ce8fcbc5971df919dc25b3f8a0fa85d6dc5f2a0c3cf7ec9d61c163d9823c091844f0 - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-literals@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/00b14e9c14cf1e871c1f3781bf6334cac339c360404afd6aba63d2f6aca9270854d59a2b40abff1c4c90d4ffdca614440842d3043316c2f0ceb155fdf7726b3b - languageName: node - linkType: hard - -"@babel/plugin-transform-logical-assignment-operators@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6e2051e10b2d6452980fc4bdef9da17c0d6ca48f81b8529e8804b031950e4fff7c74a7eb3de4a2b6ad22ffb631d0b67005425d232cce6e2b29ce861c78ed04f5 - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/91d17b451bcc5ea9f1c6f8264144057ade3338d4b92c0b248366e4db3a7790a28fd59cc56ac433a9627a9087a17a5684e53f4995dd6ae92831cb72f1bd540b54 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-amd@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-amd@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/849957d9484d0a2d93331226ed6cf840cee7d57454549534c447c93f8b839ef8553eae9877f8f550e3c39f14d60992f91244b2e8e7502a46064b56c5d68ba855 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-simple-access": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6ce771fb04d4810257fc8900374fece877dacaed74b05eaa16ad9224b390f43795c4d046cbe9ae304e1eb5aad035d37383895e3c64496d647c2128d183916e74 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8299e3437542129c2684b86f98408c690df27db4122a79edded4782cf04e755d6ecb05b1e812c81a34224a81e664303392d5f3c36f3d2d51fdc99bb91c881e9a - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-umd@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/fa11a621f023e2ac437b71d5582f819e667c94306f022583d77da9a8f772c4128861a32bbb63bef5cba581a70cd7dbe87a37238edaafcfacf889470c395e7076 - languageName: node - linkType: hard - -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/32b14fda5c885d1706863f8af2ee6c703d39264355b57482d3a24fce7f6afbd4c7a0896e501c0806ed2b0759beb621bf7f3f7de1fbbc82026039a98d961e78ef - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-new-target@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7b5f1b7998f1cf183a7fa646346e2f3742e5805b609f28ad5fee22d666a15010f3e398b7e1ab78cddb7901841a3d3f47135929af23d54e8bf4ce69b72051f71e - languageName: node - linkType: hard - -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/eb623db5be078a1c974afe7c7797b0309ba2ea9e9237c0b6831ade0f56d8248bb4ab3432ab34495ff8c877ec2fe412ff779d1e9b3c2b8139da18e1753d950bc3 - languageName: node - linkType: hard - -"@babel/plugin-transform-numeric-separator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ad63ad341977844b6f9535fcca15ca0d6d6ad112ed9cc509d4f6b75e9bf4b1b1a96a0bcb1986421a601505d34025373608b5f76d420d924b4e21f86b1a1f2749 - languageName: node - linkType: hard - -"@babel/plugin-transform-object-rest-spread@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.25.9" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/plugin-transform-parameters": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/02077d8abd83bf6a48ff0b59e98d7561407cf75b591cffd3fdc5dc5e9a13dec1c847a7a690983762a3afecddb244831e897e0515c293e7c653b262c30cd614af - languageName: node - linkType: hard - -"@babel/plugin-transform-object-super@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-object-super@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-replace-supers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0348d00e76f1f15ada44481a76e8c923d24cba91f6e49ee9b30d6861eb75344e7f84d62a18df8a6f9e9a7eacf992f388174b7f9cc4ce48287bcefca268c07600 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-catch-binding@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/722fd5ee12ab905309d4e84421584fce4b6d9e6b639b06afb20b23fa809e6ab251e908a8d5e8b14d066a28186b8ef8f58d69fd6eca9ce1b9ef7af08333378f6c - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/041ad2beae5affb8e68a0bcb6882a2dadb758db3c629a0e012f57488ab43a822ac1ea17a29db8ef36560a28262a5dfa4dbbbf06ed6e431db55abe024b7cd3961 +"@babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.20.7": +"@babel/helper-validator-identifier@npm:^7.24.5": version: 7.24.5 - resolution: "@babel/plugin-transform-parameters@npm:7.24.5" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.5" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e08b8c46a24b1b21dde7783cb0aeb56ffe9ef6d6f1795649ce76273657158d3bfa5370c6594200ed7d371983b599c8e194b76108dffed9ab5746fe630ef2e8f5 + resolution: "@babel/helper-validator-identifier@npm:7.24.5" + checksum: 10c0/05f957229d89ce95a137d04e27f7d0680d84ae48b6ad830e399db0779341f7d30290f863a93351b4b3bde2166737f73a286ea42856bb07c8ddaa95600d38645c languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.25.9": +"@babel/helper-validator-identifier@npm:^7.25.9": version: 7.25.9 - resolution: "@babel/plugin-transform-parameters@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/aecb446754b9e09d6b6fa95fd09e7cf682f8aaeed1d972874ba24c0a30a7e803ad5f014bb1fffc7bfeed22f93c0d200947407894ea59bf7687816f2f464f8df3 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.25.9": +"@babel/helper-validator-option@npm:^7.25.9": version: 7.25.9 - resolution: "@babel/plugin-transform-private-methods@npm:7.25.9" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/64bd71de93d39daefa3e6c878d6f2fd238ed7d4ecfb13b0e771ddbbc131487def3ceb405b62b534a5cbb5043046b504e1b189b0a45229cc75af979a9fbcaa7bd + resolution: "@babel/helper-validator-option@npm:7.25.9" + checksum: 10c0/27fb195d14c7dcb07f14e58fe77c44eea19a6a40a74472ec05c441478fa0bb49fa1c32b2d64be7a38870ee48ef6601bdebe98d512f0253aea0b39756c4014f3e languageName: node linkType: hard -"@babel/plugin-transform-private-property-in-object@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.25.9" +"@babel/helpers@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/helpers@npm:7.26.0" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d4965de19d9f204e692cc74dbc39f0bb469e5f29df96dd4457ea23c5e5596fba9d5af76eaa96f9d48a9fc20ec5f12a94c679285e36b8373406868ea228109e27 + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.26.0" + checksum: 10c0/343333cced6946fe46617690a1d0789346960910225ce359021a88a60a65bc0d791f0c5d240c0ed46cf8cc63b5fd7df52734ff14e43b9c32feae2b61b1647097 languageName: node linkType: hard -"@babel/plugin-transform-property-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-property-literals@npm:7.25.9" +"@babel/highlight@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/highlight@npm:7.24.2" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/1639e35b2438ccf3107af760d34e6a8e4f9acdd3ae6186ae771a6e3029bd59dfe778e502d67090f1185ecda5c16addfed77561e39c518a3f51ff10d41790e106 + "@babel/helper-validator-identifier": "npm:^7.22.20" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/98ce00321daedeed33a4ed9362dc089a70375ff1b3b91228b9f05e6591d387a81a8cba68886e207861b8871efa0bc997ceabdd9c90f6cce3ee1b2f7f941b42db languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.25.9": +"@babel/highlight@npm:^7.25.9": version: 7.25.9 - resolution: "@babel/plugin-transform-regenerator@npm:7.25.9" + resolution: "@babel/highlight@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/eef3ffc19f7d291b863635f32b896ad7f87806d9219a0d3404a470219abcfc5b43aabecd691026c48e875b965760d9c16abee25e6447272233f30cd07f453ec7 + "@babel/helper-validator-identifier": "npm:^7.25.9" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/ae0ed93c151b85a07df42936117fa593ce91563a22dfc8944a90ae7088c9679645c33e00dcd20b081c1979665d65f986241172dae1fc9e5922692fc3ff685a49 languageName: node linkType: hard -"@babel/plugin-transform-regexp-modifiers@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-transform-regexp-modifiers@npm:7.26.0" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/4abc1db6c964efafc7a927cda814c7275275afa4b530483e0936fd614de23cb5802f7ca43edaa402008a723d4e7eac282b6f5283aa2eeb3b27da6d6c1dd7f8ed +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/parser@npm:7.24.5" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/8333a6ad5328bad34fa0e12bcee147c3345ea9a438c0909e7c68c6cfbea43c464834ffd7eabd1cbc1c62df0a558e22ffade9f5b29440833ba7b33d96a71f88c0 languageName: node linkType: hard -"@babel/plugin-transform-reserved-words@npm:^7.25.9": +"@babel/parser@npm:^7.25.9": version: 7.25.9 - resolution: "@babel/plugin-transform-reserved-words@npm:7.25.9" + resolution: "@babel/parser@npm:7.25.9" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8b028b80d1983e3e02f74e21924323cc66ba930e5c5758909a122aa7d80e341b8b0f42e1698e42b50d47a6ba911332f584200b28e1a4e2104b7514d9dc011e96 + "@babel/types": "npm:^7.25.9" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/143faff8a72331be5ed94080e0f4645cbeea814fb488cd9210154083735f67cb66fde32f6a4a80efd6c4cdf12c6f8b50995a465846093c7f65c5da8d7829627c languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.25.9" +"@babel/parser@npm:^7.26.0": + version: 7.26.0 + resolution: "@babel/parser@npm:7.26.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/05a20d45f0fb62567644c507ccd4e379c1a74dacf887d2b2cac70247415e3f6d7d3bf4850c8b336053144715fedb6200fc38f7130c4b76c94eec9b9c0c2a8e9b + "@babel/types": "npm:^7.26.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/05619e239be811f4d8a9f471534c0d7dbc44faf38f6a6445663710982d2f9b057be43b4d18906d4e28830958752bdadbf88903abf687304a2bda86c4b3489455 languageName: node linkType: hard -"@babel/plugin-transform-spread@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-spread@npm:7.25.9" +"@babel/plugin-syntax-async-generators@npm:^7.8.4": + version: 7.8.4 + resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/996c8fed238efc30e0664f9f58bd7ec8c148f4659f84425f68923a094fe891245711d26eb10d1f815f50c124434e076e860dbe9662240844d1b77cd09907dcdf + checksum: 10c0/d13efb282838481348c71073b6be6245b35d4f2f964a8f71e4174f235009f929ef7613df25f8d2338e2d3e44bc4265a9f8638c6aaa136d7a61fe95985f9725c8 languageName: node linkType: hard -"@babel/plugin-transform-sticky-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.25.9" +"@babel/plugin-syntax-bigint@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/e9612b0615dab4c4fba1c560769616a9bd7b9226c73191ef84b6c3ee185c8b719b4f887cdd8336a0a13400ce606ab4a0d33bc8fa6b4fcdb53e2896d07f2568f6 + checksum: 10c0/686891b81af2bc74c39013655da368a480f17dd237bf9fbc32048e5865cb706d5a8f65438030da535b332b1d6b22feba336da8fa931f663b6b34e13147d12dde languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-template-literals@npm:7.25.9" +"@babel/plugin-syntax-class-properties@npm:^7.8.3": + version: 7.12.13 + resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.12.13" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/5144da6036807bbd4e9d2a8b92ae67a759543929f34f4db9b463448a77298f4a40bf1e92e582db208fe08ee116224806a3bd0bed75d9da404fc2c0af9e6da540 + checksum: 10c0/95168fa186416195280b1264fb18afcdcdcea780b3515537b766cb90de6ce042d42dd6a204a39002f794ae5845b02afb0fd4861a3308a861204a55e68310a120 languageName: node linkType: hard -"@babel/plugin-transform-typeof-symbol@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.25.9" +"@babel/plugin-syntax-import-meta@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/2b19fd88608589d9bc6b607ff17b06791d35c67ef3249f4659283454e6a9984241e3bd4c4eb72bb8b3d860a73223f3874558b861adb7314aa317c1c6a2f0cafb + checksum: 10c0/0b08b5e4c3128523d8e346f8cfc86824f0da2697b1be12d71af50a31aff7a56ceb873ed28779121051475010c28d6146a6bfea8518b150b71eeb4e46190172ee languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-typescript@npm:7.25.9" +"@babel/plugin-syntax-json-strings@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-json-strings@npm:7.8.3" dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - "@babel/plugin-syntax-typescript": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/c607ddb45f7e33cfcb928aad05cb1b18b1ecb564d2329d8f8e427f75192511aa821dee42d26871f1bdffbd883853e150ba81436664646c6e6b13063e65ce1475 + checksum: 10c0/e98f31b2ec406c57757d115aac81d0336e8434101c224edd9a5c93cefa53faf63eacc69f3138960c8b25401315af03df37f68d316c151c4b933136716ed6906e languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.25.9" +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/615c84d7c53e1575d54ba9257e753e0b98c5de1e3225237d92f55226eaab8eb5bceb74df43f50f4aa162b0bbcc934ed11feafe2b60b8ec4934ce340fad4b8828 + checksum: 10c0/2594cfbe29411ad5bc2ad4058de7b2f6a8c5b86eda525a993959438615479e59c012c14aec979e538d60a584a1a799b60d1b8942c3b18468cb9d99b8fd34cd0b languageName: node linkType: hard -"@babel/plugin-transform-unicode-property-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.25.9" +"@babel/plugin-syntax-nullish-coalescing-operator@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-nullish-coalescing-operator@npm:7.8.3" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/1685836fc38af4344c3d2a9edbd46f7c7b28d369b63967d5b83f2f6849ec45b97223461cea3d14cc3f0be6ebb284938e637a5ca3955c0e79c873d62f593d615c + checksum: 10c0/2024fbb1162899094cfc81152449b12bd0cc7053c6d4bda8ac2852545c87d0a851b1b72ed9560673cbf3ef6248257262c3c04aabf73117215c1b9cc7dd2542ce languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.9" +"@babel/plugin-syntax-numeric-separator@npm:^7.8.3": + version: 7.10.4 + resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/448004f978279e726af26acd54f63f9002c9e2582ecd70d1c5c4436f6de490fcd817afb60016d11c52f5ef17dbaac2590e8cc7bfaf4e91b58c452cf188c7920f + checksum: 10c0/c55a82b3113480942c6aa2fcbe976ff9caa74b7b1109ff4369641dfbc88d1da348aceb3c31b6ed311c84d1e7c479440b961906c735d0ab494f688bf2fd5b9bb9 languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.9" +"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/56ee04fbe236b77cbcd6035cbf0be7566d1386b8349154ac33244c25f61170c47153a9423cd1d92855f7d6447b53a4a653d9e8fd1eaeeee14feb4b2baf59bd9f + "@babel/core": ^7.0.0-0 + checksum: 10c0/ee1eab52ea6437e3101a0a7018b0da698545230015fc8ab129d292980ec6dff94d265e9e90070e8ae5fed42f08f1622c14c94552c77bcac784b37f503a82ff26 languageName: node linkType: hard -"@babel/preset-env@npm:^7.16.11": - version: 7.26.0 - resolution: "@babel/preset-env@npm:7.26.0" +"@babel/plugin-syntax-optional-catch-binding@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-catch-binding@npm:7.8.3" dependencies: - "@babel/compat-data": "npm:^7.26.0" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.25.9" - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.25.9" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.25.9" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.25.9" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.25.9" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-import-assertions": "npm:^7.26.0" - "@babel/plugin-syntax-import-attributes": "npm:^7.26.0" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.25.9" - "@babel/plugin-transform-async-generator-functions": "npm:^7.25.9" - "@babel/plugin-transform-async-to-generator": "npm:^7.25.9" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.25.9" - "@babel/plugin-transform-block-scoping": "npm:^7.25.9" - "@babel/plugin-transform-class-properties": "npm:^7.25.9" - "@babel/plugin-transform-class-static-block": "npm:^7.26.0" - "@babel/plugin-transform-classes": "npm:^7.25.9" - "@babel/plugin-transform-computed-properties": "npm:^7.25.9" - "@babel/plugin-transform-destructuring": "npm:^7.25.9" - "@babel/plugin-transform-dotall-regex": "npm:^7.25.9" - "@babel/plugin-transform-duplicate-keys": "npm:^7.25.9" - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.25.9" - "@babel/plugin-transform-dynamic-import": "npm:^7.25.9" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.25.9" - "@babel/plugin-transform-export-namespace-from": "npm:^7.25.9" - "@babel/plugin-transform-for-of": "npm:^7.25.9" - "@babel/plugin-transform-function-name": "npm:^7.25.9" - "@babel/plugin-transform-json-strings": "npm:^7.25.9" - "@babel/plugin-transform-literals": "npm:^7.25.9" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.25.9" - "@babel/plugin-transform-member-expression-literals": "npm:^7.25.9" - "@babel/plugin-transform-modules-amd": "npm:^7.25.9" - "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" - "@babel/plugin-transform-modules-systemjs": "npm:^7.25.9" - "@babel/plugin-transform-modules-umd": "npm:^7.25.9" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.25.9" - "@babel/plugin-transform-new-target": "npm:^7.25.9" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.25.9" - "@babel/plugin-transform-numeric-separator": "npm:^7.25.9" - "@babel/plugin-transform-object-rest-spread": "npm:^7.25.9" - "@babel/plugin-transform-object-super": "npm:^7.25.9" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.25.9" - "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" - "@babel/plugin-transform-parameters": "npm:^7.25.9" - "@babel/plugin-transform-private-methods": "npm:^7.25.9" - "@babel/plugin-transform-private-property-in-object": "npm:^7.25.9" - "@babel/plugin-transform-property-literals": "npm:^7.25.9" - "@babel/plugin-transform-regenerator": "npm:^7.25.9" - "@babel/plugin-transform-regexp-modifiers": "npm:^7.26.0" - "@babel/plugin-transform-reserved-words": "npm:^7.25.9" - "@babel/plugin-transform-shorthand-properties": "npm:^7.25.9" - "@babel/plugin-transform-spread": "npm:^7.25.9" - "@babel/plugin-transform-sticky-regex": "npm:^7.25.9" - "@babel/plugin-transform-template-literals": "npm:^7.25.9" - "@babel/plugin-transform-typeof-symbol": "npm:^7.25.9" - "@babel/plugin-transform-unicode-escapes": "npm:^7.25.9" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.25.9" - "@babel/plugin-transform-unicode-regex": "npm:^7.25.9" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.9" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.6" - babel-plugin-polyfill-regenerator: "npm:^0.6.1" - core-js-compat: "npm:^3.38.1" - semver: "npm:^6.3.1" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/26e19dc407cfa1c5166be638b4c54239d084fe15d8d7e6306d8c6dc7bc1decc51070a8dcf28352c1a2feeefbe52a06d193a12e302327ad5f529583df75fb7a26 + checksum: 10c0/27e2493ab67a8ea6d693af1287f7e9acec206d1213ff107a928e85e173741e1d594196f99fec50e9dde404b09164f39dec5864c767212154ffe1caa6af0bc5af languageName: node linkType: hard -"@babel/preset-modules@npm:0.1.6-no-external-plugins": - version: 0.1.6-no-external-plugins - resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" +"@babel/plugin-syntax-optional-chaining@npm:^7.8.3": + version: 7.8.3 + resolution: "@babel/plugin-syntax-optional-chaining@npm:7.8.3" dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@babel/types": "npm:^7.4.4" - esutils: "npm:^2.0.2" + "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: - "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/9d02f70d7052446c5f3a4fb39e6b632695fb6801e46d31d7f7c5001f7c18d31d1ea8369212331ca7ad4e7877b73231f470b0d559162624128f1b80fe591409e6 + "@babel/core": ^7.0.0-0 + checksum: 10c0/46edddf2faa6ebf94147b8e8540dfc60a5ab718e2de4d01b2c0bdf250a4d642c2bd47cbcbb739febcb2bf75514dbcefad3c52208787994b8d0f8822490f55e81 languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.16.7": - version: 7.26.0 - resolution: "@babel/preset-typescript@npm:7.26.0" +"@babel/plugin-syntax-top-level-await@npm:^7.8.3": + version: 7.14.5 + resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-syntax-jsx": "npm:^7.25.9" - "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" - "@babel/plugin-transform-typescript": "npm:^7.25.9" + "@babel/helper-plugin-utils": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10c0/20d86bc45d2bbfde2f84fc7d7b38746fa6481d4bde6643039ad4b1ff0b804c6d210ee43e6830effd8571f2ff43fa7ffd27369f42f2b3a2518bb92dc86c780c61 + checksum: 10c0/14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f languageName: node linkType: hard -"@babel/runtime@npm:^7.8.4": - version: 7.17.9 - resolution: "@babel/runtime@npm:7.17.9" +"@babel/plugin-syntax-typescript@npm:^7.7.2": + version: 7.16.7 + resolution: "@babel/plugin-syntax-typescript@npm:7.16.7" dependencies: - regenerator-runtime: "npm:^0.13.4" - checksum: 10c0/758ce8855a75408555ed9d196c82c86350257765095a5d3e05df35875d1b0cd42223c6f62356f000b1e1efe8e345d6312c60ae98e8727a2a49909a656f0fd805 + "@babel/helper-plugin-utils": "npm:^7.16.7" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10c0/8eb1dbc06511035293d1af8172be5edec8d80e1a5c908258a1abd4fccb18879cdbae31e8ff813b310e4598a0a5484ebe0b686d50a0e820c17ed518bdca8c1af9 languageName: node linkType: hard -"@babel/template@npm:^7.18.6, @babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": version: 7.24.0 resolution: "@babel/template@npm:7.24.0" dependencies: @@ -1695,7 +463,22 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.18.6, @babel/traverse@npm:^7.7.2": +"@babel/traverse@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/traverse@npm:7.25.9" + dependencies: + "@babel/code-frame": "npm:^7.25.9" + "@babel/generator": "npm:^7.25.9" + "@babel/parser": "npm:^7.25.9" + "@babel/template": "npm:^7.25.9" + "@babel/types": "npm:^7.25.9" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10c0/e90be586a714da4adb80e6cb6a3c5cfcaa9b28148abdafb065e34cc109676fc3db22cf98cd2b2fff66ffb9b50c0ef882cab0f466b6844be0f6c637b82719bba1 + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.7.2": version: 7.24.5 resolution: "@babel/traverse@npm:7.24.5" dependencies: @@ -1713,22 +496,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/traverse@npm:7.25.9" - dependencies: - "@babel/code-frame": "npm:^7.25.9" - "@babel/generator": "npm:^7.25.9" - "@babel/parser": "npm:^7.25.9" - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/e90be586a714da4adb80e6cb6a3c5cfcaa9b28148abdafb065e34cc109676fc3db22cf98cd2b2fff66ffb9b50c0ef882cab0f466b6844be0f6c637b82719bba1 - languageName: node - linkType: hard - -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.16.7, @babel/types@npm:^7.18.6, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": version: 7.24.5 resolution: "@babel/types@npm:7.24.5" dependencies: @@ -2580,15 +1348,6 @@ __metadata: languageName: node linkType: hard -"@jsdoc/salty@npm:^0.2.1": - version: 0.2.1 - resolution: "@jsdoc/salty@npm:0.2.1" - dependencies: - lodash: "npm:^4.17.21" - checksum: 10c0/ceec0488dfc2229fa6381f70f32cda1db495cd1a47d8afc88684a922a5aab68cc9236a0b47decd0bf2d947b0642a232087d7c24c76351a5df43ac8f9c18064f2 - languageName: node - linkType: hard - "@lezer/common@npm:^0.15.0, @lezer/common@npm:^0.15.7": version: 0.15.12 resolution: "@lezer/common@npm:0.15.12" @@ -2647,13 +1406,13 @@ __metadata: languageName: node linkType: hard -"@martijnversluis/unibuild@npm:^1.1.0": - version: 1.1.0 - resolution: "@martijnversluis/unibuild@npm:1.1.0" +"@martijnversluis/unibuild@npm:1.2.2": + version: 1.2.2 + resolution: "@martijnversluis/unibuild@npm:1.2.2" dependencies: chalk: "npm:^5.3.0" commander: "npm:^12.1.0" - checksum: 10c0/536dda06461dd6d9043370cc10b415f60e3ffd236edd68b9941b76b41714ff9ef11e1318f6470ed9dcc9fa81dbe4a3e6e9c58fdae694800af908745e801b9058 + checksum: 10c0/0f3832a3b3460b38d2a9051b7286ba7d7723a559f4f6411841a505aa04747572d483f4a09c0c5bdf7561630882e77d8cc101974d1fb897ba52d55dd659fccfcd languageName: node linkType: hard @@ -2710,13 +1469,6 @@ __metadata: languageName: node linkType: hard -"@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.3": - version: 2.1.8-no-fsevents.3 - resolution: "@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.3" - checksum: 10c0/27dcabaa0c9a29b3a60217bd3fff87a22cb43ed77863da570c6828e4d0b8f1c6ee52582cd3d439275a2b1f2051005e648ed866b981f2a03b61c645b7e4806ba7 - languageName: node - linkType: hard - "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -3564,6 +2316,58 @@ __metadata: languageName: node linkType: hard +"@shikijs/core@npm:1.23.1": + version: 1.23.1 + resolution: "@shikijs/core@npm:1.23.1" + dependencies: + "@shikijs/engine-javascript": "npm:1.23.1" + "@shikijs/engine-oniguruma": "npm:1.23.1" + "@shikijs/types": "npm:1.23.1" + "@shikijs/vscode-textmate": "npm:^9.3.0" + "@types/hast": "npm:^3.0.4" + hast-util-to-html: "npm:^9.0.3" + checksum: 10c0/3f0d343322aad8ecdaa3dd416e613113bd9fce608495e5c3c0e3e492abcd8f5c7011bf939d3fc11a907e0b402921df2d3dee985fac2e2b3e6013fe29709f81cf + languageName: node + linkType: hard + +"@shikijs/engine-javascript@npm:1.23.1": + version: 1.23.1 + resolution: "@shikijs/engine-javascript@npm:1.23.1" + dependencies: + "@shikijs/types": "npm:1.23.1" + "@shikijs/vscode-textmate": "npm:^9.3.0" + oniguruma-to-es: "npm:0.4.1" + checksum: 10c0/a8e3b941c9016a8ad62590a551a9f613b45f3267855880773eb61309e6d2b3bfc6248a1812b80b95b6335fb25ae5ad433eb3e6308d6061860865e9f882850621 + languageName: node + linkType: hard + +"@shikijs/engine-oniguruma@npm:1.23.1": + version: 1.23.1 + resolution: "@shikijs/engine-oniguruma@npm:1.23.1" + dependencies: + "@shikijs/types": "npm:1.23.1" + "@shikijs/vscode-textmate": "npm:^9.3.0" + checksum: 10c0/834f64cb66c844763ae44f481d55c361f851ae0deec0edfb00e1de05959b6672cbfd9189a1c5943beacfb66468d6a2c788b8f5874360e80dc417109117e86d3a + languageName: node + linkType: hard + +"@shikijs/types@npm:1.23.1": + version: 1.23.1 + resolution: "@shikijs/types@npm:1.23.1" + dependencies: + "@shikijs/vscode-textmate": "npm:^9.3.0" + "@types/hast": "npm:^3.0.4" + checksum: 10c0/5360e5ff777e5945137ca6bf9aab8ea5d30632ccf648825e67908d1840cac7ab9fc25b5bc321e99a7120f454cf3639a8ab252568010c7dc5a260744bfa0a5352 + languageName: node + linkType: hard + +"@shikijs/vscode-textmate@npm:^9.3.0": + version: 9.3.0 + resolution: "@shikijs/vscode-textmate@npm:9.3.0" + checksum: 10c0/6aa80798b7d7f8be8029bb397ce1b9b75c0d0963d6aa444b9ae165595ceee931cf3767ca1681ba71a6e27484eeccab584bd38db3420da477f1a8d745040b1b1f + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -3730,6 +2534,30 @@ __metadata: languageName: node linkType: hard +"@textlint/ast-node-types@npm:^12.6.1": + version: 12.6.1 + resolution: "@textlint/ast-node-types@npm:12.6.1" + checksum: 10c0/be9108dab7d39821f3b63032369a53023202fd5a087a973b783081a549e898dad67320a9eb792d3c844c51e7f1e4a2eefdcc85be06f9cfa5a4a4d7a46643f19d + languageName: node + linkType: hard + +"@textlint/markdown-to-ast@npm:^12.1.1": + version: 12.6.1 + resolution: "@textlint/markdown-to-ast@npm:12.6.1" + dependencies: + "@textlint/ast-node-types": "npm:^12.6.1" + debug: "npm:^4.3.4" + mdast-util-gfm-autolink-literal: "npm:^0.1.3" + remark-footnotes: "npm:^3.0.0" + remark-frontmatter: "npm:^3.0.0" + remark-gfm: "npm:^1.0.0" + remark-parse: "npm:^9.0.0" + traverse: "npm:^0.6.7" + unified: "npm:^9.2.2" + checksum: 10c0/b04deb2cdc331a3d9d5397babc1f0494a80bcc2a9829f3953fb721765105ba0dd4790b31165847a7c29875398f09dc229fd5d06b900fd2821fe1bfa8d47d69ce + languageName: node + linkType: hard + "@tootallnate/once@npm:1": version: 1.1.2 resolution: "@tootallnate/once@npm:1.1.2" @@ -3848,6 +2676,15 @@ __metadata: languageName: node linkType: hard +"@types/hast@npm:^3.0.0, @types/hast@npm:^3.0.4": + version: 3.0.4 + resolution: "@types/hast@npm:3.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10c0/3249781a511b38f1d330fd1e3344eed3c4e7ea8eff82e835d35da78e637480d36fad37a78be5a7aed8465d237ad0446abc1150859d0fde395354ea634decf9f7 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.4 resolution: "@types/istanbul-lib-coverage@npm:2.0.4" @@ -3890,13 +2727,6 @@ __metadata: languageName: node linkType: hard -"@types/linkify-it@npm:^5": - version: 5.0.0 - resolution: "@types/linkify-it@npm:5.0.0" - checksum: 10c0/7bbbf45b9dde17bf3f184fee585aef0e7342f6954f0377a24e4ff42ab5a85d5b806aaa5c8d16e2faf2a6b87b2d94467a196b7d2b85c9c7de2f0eaac5487aaab8 - languageName: node - linkType: hard - "@types/lodash.get@npm:^4.4.7": version: 4.4.9 resolution: "@types/lodash.get@npm:4.4.9" @@ -3913,20 +2743,28 @@ __metadata: languageName: node linkType: hard -"@types/markdown-it@npm:^14.1.1": - version: 14.1.2 - resolution: "@types/markdown-it@npm:14.1.2" +"@types/mdast@npm:^3.0.0": + version: 3.0.15 + resolution: "@types/mdast@npm:3.0.15" dependencies: - "@types/linkify-it": "npm:^5" - "@types/mdurl": "npm:^2" - checksum: 10c0/34f709f0476bd4e7b2ba7c3341072a6d532f1f4cb6f70aef371e403af8a08a7c372ba6907ac426bc618d356dab660c5b872791ff6c1ead80c483e0d639c6f127 + "@types/unist": "npm:^2" + checksum: 10c0/fcbf716c03d1ed5465deca60862e9691414f9c43597c288c7d2aefbe274552e1bbd7aeee91b88a02597e88a28c139c57863d0126fcf8416a95fdc681d054ee3d languageName: node linkType: hard -"@types/mdurl@npm:^2": - version: 2.0.0 - resolution: "@types/mdurl@npm:2.0.0" - checksum: 10c0/cde7bb571630ed1ceb3b92a28f7b59890bb38b8f34cd35326e2df43eebfc74985e6aa6fd4184e307393bad8a9e0783a519a3f9d13c8e03788c0f98e5ec869c5e +"@types/mdast@npm:^4.0.0": + version: 4.0.4 + resolution: "@types/mdast@npm:4.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10c0/84f403dbe582ee508fd9c7643ac781ad8597fcbfc9ccb8d4715a2c92e4545e5772cbd0dbdf18eda65789386d81b009967fdef01b24faf6640f817287f54d9c82 + languageName: node + linkType: hard + +"@types/minimist@npm:^1.2.0": + version: 1.2.5 + resolution: "@types/minimist@npm:1.2.5" + checksum: 10c0/3f791258d8e99a1d7d0ca2bda1ca6ea5a94e5e7b8fc6cde84dd79b0552da6fb68ade750f0e17718f6587783c24254bbca0357648dd59dc3812c150305cabdc46 languageName: node linkType: hard @@ -3939,6 +2777,13 @@ __metadata: languageName: node linkType: hard +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 10c0/aef7bb9b015883d6f4119c423dd28c4bdc17b0e8a0ccf112c78b4fe0e91fbc4af7c6204b04bba0e199a57d2f3fbbd5b4a14bf8739bf9d2a39b2a0aad545e0f86 + languageName: node + linkType: hard + "@types/parse-json@npm:^4.0.0": version: 4.0.0 resolution: "@types/parse-json@npm:4.0.0" @@ -3960,6 +2805,20 @@ __metadata: languageName: node linkType: hard +"@types/unist@npm:*, @types/unist@npm:^3.0.0": + version: 3.0.3 + resolution: "@types/unist@npm:3.0.3" + checksum: 10c0/2b1e4adcab78388e088fcc3c0ae8700f76619dbcb4741d7d201f87e2cb346bfc29a89003cfea2d76c996e1061452e14fcd737e8b25aacf949c1f2d6b2bc3dd60 + languageName: node + linkType: hard + +"@types/unist@npm:^2, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": + version: 2.0.11 + resolution: "@types/unist@npm:2.0.11" + checksum: 10c0/24dcdf25a168f453bb70298145eb043cfdbb82472db0bc0b56d6d51cd2e484b9ed8271d4ac93000a80da568f2402e9339723db262d0869e2bf13bc58e081768d + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.0 resolution: "@types/yargs-parser@npm:21.0.0" @@ -4170,6 +3029,13 @@ __metadata: languageName: node linkType: hard +"@ungap/structured-clone@npm:^1.0.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 10c0/8209c937cb39119f44eb63cf90c0b73e7c754209a6411c707be08e50e29ee81356dca1a848a405c8bdeebfe2f5e4f831ad310ae1689eeef65e7445c090c6657d + languageName: node + linkType: hard + "abab@npm:^2.0.3, abab@npm:^2.0.5": version: 2.0.6 resolution: "abab@npm:2.0.6" @@ -4302,6 +3168,15 @@ __metadata: languageName: node linkType: hard +"anchor-markdown-header@npm:^0.6.0": + version: 0.6.0 + resolution: "anchor-markdown-header@npm:0.6.0" + dependencies: + emoji-regex: "npm:~10.1.0" + checksum: 10c0/e6bfbf0e506b8dd6ed6f50e58e91a011f1a705efbceb32cb99d6d608548893695da55c68651e6e4b04b95a4822328d9f13352ffa144dbc4ca6c534bdab403728 + languageName: node + linkType: hard + "ansi-escapes@npm:^4.2.1": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" @@ -4357,7 +3232,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": +"anymatch@npm:^3.0.3": version: 3.1.2 resolution: "anymatch@npm:3.1.2" dependencies: @@ -4390,10 +3265,43 @@ __metadata: languageName: node linkType: hard -"array-back@npm:^6.2.2": - version: 6.2.2 - resolution: "array-back@npm:6.2.2" - checksum: 10c0/c98a6e43b669400f58e2fba478336d5d02aac970566ffae3af0cb9b5585ec3811a1e010c76e34fb809a9762e6822a43a9c9a1b99f2a35f43b11a9e198e782818 +"array-buffer-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "array-buffer-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.5" + is-array-buffer: "npm:^3.0.4" + checksum: 10c0/f5cdf54527cd18a3d2852ddf73df79efec03829e7373a8322ef5df2b4ef546fb365c19c71d6b42d641cb6bfe0f1a2f19bc0ece5b533295f86d7c3d522f228917 + languageName: node + linkType: hard + +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 10c0/429897e68110374f39b771ec47a7161fc6a8fc33e196857c0a396dc75df0b5f65e4d046674db764330b6bb66b39ef48dd7c53b6a2ee75cfb0681e0c1a7033962 + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" + dependencies: + array-buffer-byte-length: "npm:^1.0.1" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.3" + is-array-buffer: "npm:^3.0.4" + is-shared-array-buffer: "npm:^1.0.2" + checksum: 10c0/d32754045bcb2294ade881d45140a5e52bda2321b9e98fa514797b7f0d252c4c5ab0d1edb34112652c62fa6a9398def568da63a4d7544672229afea283358c36 + languageName: node + linkType: hard + +"arrify@npm:^1.0.1": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 10c0/c35c8d1a81bcd5474c0c57fe3f4bad1a4d46a5fa353cedcff7a54da315df60db71829e69104b859dff96c5d68af46bd2be259fe5e50dc6aa9df3b36bea0383ab languageName: node linkType: hard @@ -4420,6 +3328,15 @@ __metadata: languageName: node linkType: hard +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: "npm:^1.0.0" + checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 + languageName: node + linkType: hard + "b4a@npm:^1.6.4": version: 1.6.6 resolution: "b4a@npm:1.6.6" @@ -4470,42 +3387,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.10": - version: 0.4.10 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.10" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.6.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/910bfb1d809cae49cf43348f9b1e4a5e4c895aa25686fdd2ff8af7b7a996b88ad39597707905d097e08d4e70e14340ac935082ef4e035e77f68741f813f2a80d - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.10.6": - version: 0.10.6 - resolution: "babel-plugin-polyfill-corejs3@npm:0.10.6" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.6.2" - core-js-compat: "npm:^3.38.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/3a69220471b07722c2ae6537310bf26b772514e12b601398082965459c838be70a0ca70b0662f0737070654ff6207673391221d48599abb4a2b27765206d9f79 - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.6.1": - version: 0.6.1 - resolution: "babel-plugin-polyfill-regenerator@npm:0.6.1" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.6.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/0b55a35a75a261f62477d8d0f0c4a8e3b66f109323ce301d7de6898e168c41224de3bc26a92f48f2c7fcc19dfd1fc60fe71098bfd4f804a0463ff78586892403 - languageName: node - linkType: hard - "babel-preset-current-node-syntax@npm:^1.0.0": version: 1.0.1 resolution: "babel-preset-current-node-syntax@npm:1.0.1" @@ -4540,6 +3421,13 @@ __metadata: languageName: node linkType: hard +"bail@npm:^1.0.0": + version: 1.0.5 + resolution: "bail@npm:1.0.5" + checksum: 10c0/4cf7d0b5c82fdc69590b3fe85c17c4ec37647681b20875551fd6187a85c122b20178dc118001d3ebd5d0ab3dc0e95637c71f889f481882ee761db43c6b16fa05 + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -4613,20 +3501,6 @@ __metadata: languageName: node linkType: hard -"binary-extensions@npm:^2.0.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: 10c0/d73d8b897238a2d3ffa5f59c0241870043aa7471335e89ea5e1ff48edb7c2d0bb471517a3e4c5c3f4c043615caa2717b5f80a5e61e07503d51dc85cb848e665d - languageName: node - linkType: hard - -"bluebird@npm:^3.7.2": - version: 3.7.2 - resolution: "bluebird@npm:3.7.2" - checksum: 10c0/680de03adc54ff925eaa6c7bb9a47a0690e8b5de60f4792604aae8ed618c65e6b63a7893b57ca924beaf53eee69c5af4f8314148c08124c550fe1df1add897d2 - languageName: node - linkType: hard - "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -4646,7 +3520,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.3, braces@npm:~3.0.2": +"braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -4662,34 +3536,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.22.2": - version: 4.22.2 - resolution: "browserslist@npm:4.22.2" - dependencies: - caniuse-lite: "npm:^1.0.30001565" - electron-to-chromium: "npm:^1.4.601" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.13" - bin: - browserslist: cli.js - checksum: 10c0/2a331aab90503130043ca41dd5d281fa1e89d5e076d07a2d75e76bf4d693bd56e73d5abcd8c4f39119da6328d450578c216cf1cd5c99b82d8a90a2ae6271b465 - languageName: node - linkType: hard - -"browserslist@npm:^4.23.3": - version: 4.23.3 - resolution: "browserslist@npm:4.23.3" - dependencies: - caniuse-lite: "npm:^1.0.30001646" - electron-to-chromium: "npm:^1.5.4" - node-releases: "npm:^2.0.18" - update-browserslist-db: "npm:^1.1.0" - bin: - browserslist: cli.js - checksum: 10c0/3063bfdf812815346447f4796c8f04601bf5d62003374305fd323c2a463e42776475bcc5309264e39bcf9a8605851e53560695991a623be988138b3ff8c66642 - languageName: node - linkType: hard - "browserslist@npm:^4.24.0": version: 4.24.0 resolution: "browserslist@npm:4.24.0" @@ -4781,21 +3627,7 @@ __metadata: languageName: node linkType: hard -"cache-point@npm:^3.0.0": - version: 3.0.0 - resolution: "cache-point@npm:3.0.0" - dependencies: - array-back: "npm:^6.2.2" - peerDependencies: - "@75lb/nature": ^0.1.1 - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/ebee8ea1192fca51d59d90e6fb9b83e728db8145aa0c9ab91acb783800539cfa3c2a0d7e6d5c49e1915d42f4181b460e07f211a3a9510af366dc915858507986 - languageName: node - linkType: hard - -"call-bind@npm:^1.0.5, call-bind@npm:^1.0.7": +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": version: 1.0.7 resolution: "call-bind@npm:1.0.7" dependencies: @@ -4815,6 +3647,17 @@ __metadata: languageName: node linkType: hard +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: "npm:^5.3.1" + map-obj: "npm:^4.0.0" + quick-lru: "npm:^4.0.1" + checksum: 10c0/bf1a28348c0f285c6c6f68fb98a9d088d3c0269fed0cdff3ea680d5a42df8a067b4de374e7a33e619eb9d5266a448fe66c2dd1f8e0c9209ebc348632882a3526 + languageName: node + linkType: hard + "camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" @@ -4836,20 +3679,6 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001565": - version: 1.0.30001568 - resolution: "caniuse-lite@npm:1.0.30001568" - checksum: 10c0/13f01e5a2481134bd61cf565ce9fecbd8e107902927a0dcf534230a92191a81f1715792170f5f39719c767c3a96aa6df9917a8d5601f15bbd5e4041a8cfecc99 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001646": - version: 1.0.30001651 - resolution: "caniuse-lite@npm:1.0.30001651" - checksum: 10c0/7821278952a6dbd17358e5d08083d258f092e2a530f5bc1840657cb140fbbc5ec44293bc888258c44a18a9570cde149ed05819ac8320b9710cf22f699891e6ad - languageName: node - linkType: hard - "caniuse-lite@npm:^1.0.30001663": version: 1.0.30001667 resolution: "caniuse-lite@npm:1.0.30001667" @@ -4857,21 +3686,17 @@ __metadata: languageName: node linkType: hard -"catharsis@npm:^0.9.0": - version: 0.9.0 - resolution: "catharsis@npm:0.9.0" - dependencies: - lodash: "npm:^4.17.15" - checksum: 10c0/9ac03ca48154ac63cfdb6c1645481d9d04f3c3e0dea131debf3116a0c12aa47e8864be7dcf770932c46d75bdd844a99f0c116c234e57232ad1f427751498e7ed +"ccount@npm:^1.0.0": + version: 1.1.0 + resolution: "ccount@npm:1.1.0" + checksum: 10c0/9ccfddfa45c8d6d01411b8e30d2ce03c55c33f32a69bdb84ee44d743427cdb01b03159954917023d0dac960c34973ba42626bb9fa883491ebb663a53a6713d43 languageName: node linkType: hard -"chalk-template@npm:^0.4.0": - version: 0.4.0 - resolution: "chalk-template@npm:0.4.0" - dependencies: - chalk: "npm:^4.1.2" - checksum: 10c0/6a4cb4252966475f0bd3ee1cd8780146e1ba69f445e59c565cab891ac18708c8143515d23e2b0fb7e192574fb7608d429ea5b28f3b7b9507770ad6fccd3467e3 +"ccount@npm:^2.0.0": + version: 2.0.1 + resolution: "ccount@npm:2.0.1" + checksum: 10c0/3939b1664390174484322bc3f45b798462e6c07ee6384cb3d645e0aa2f318502d174845198c1561930e1d431087f74cf1fe291ae9a4722821a9f4ba67e574350 languageName: node linkType: hard @@ -4910,22 +3735,38 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.6.0": - version: 3.6.0 - resolution: "chokidar@npm:3.6.0" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 +"character-entities-html4@npm:^2.0.0": + version: 2.1.0 + resolution: "character-entities-html4@npm:2.1.0" + checksum: 10c0/fe61b553f083400c20c0b0fd65095df30a0b445d960f3bbf271536ae6c3ba676f39cb7af0b4bf2755812f08ab9b88f2feed68f9aebb73bb153f7a115fe5c6e40 + languageName: node + linkType: hard + +"character-entities-legacy@npm:^1.0.0": + version: 1.1.4 + resolution: "character-entities-legacy@npm:1.1.4" + checksum: 10c0/ea4ca9c29887335eed86d78fc67a640168342b1274da84c097abb0575a253d1265281a5052f9a863979e952bcc267b4ecaaf4fe233a7e1e0d8a47806c65b96c7 + languageName: node + linkType: hard + +"character-entities-legacy@npm:^3.0.0": + version: 3.0.0 + resolution: "character-entities-legacy@npm:3.0.0" + checksum: 10c0/ec4b430af873661aa754a896a2b55af089b4e938d3d010fad5219299a6b6d32ab175142699ee250640678cd64bdecd6db3c9af0b8759ab7b155d970d84c4c7d1 + languageName: node + linkType: hard + +"character-entities@npm:^1.0.0": + version: 1.2.4 + resolution: "character-entities@npm:1.2.4" + checksum: 10c0/ad015c3d7163563b8a0ee1f587fb0ef305ef344e9fd937f79ca51cccc233786a01d591d989d5bf7b2e66b528ac9efba47f3b1897358324e69932f6d4b25adfe1 + languageName: node + linkType: hard + +"character-reference-invalid@npm:^1.0.0": + version: 1.1.4 + resolution: "character-reference-invalid@npm:1.1.4" + checksum: 10c0/29f05081c5817bd1e975b0bf61e77b60a40f62ad371d0f0ce0fdb48ab922278bc744d1fbe33771dced751887a8403f265ff634542675c8d7375f6ff4811efd0e languageName: node linkType: hard @@ -4933,22 +3774,16 @@ __metadata: version: 0.0.0-use.local resolution: "chordsheetjs@workspace:." dependencies: - "@babel/cli": "npm:^7.17.6" - "@babel/core": "npm:^7.17.9" - "@babel/helper-get-function-arity": "npm:^7.16.7" - "@babel/plugin-proposal-class-properties": "npm:^7.16.7" - "@babel/plugin-proposal-object-rest-spread": "npm:^7.17.3" - "@babel/preset-env": "npm:^7.16.11" - "@babel/preset-typescript": "npm:^7.16.7" "@eslint/core": "npm:^0.9.0" "@eslint/js": "npm:^9.11.0" - "@martijnversluis/unibuild": "npm:^1.1.0" + "@martijnversluis/unibuild": "npm:1.2.2" "@parcel/packager-ts": "npm:2.13.0" "@parcel/transformer-typescript-types": "npm:2.13.0" "@types/eslint__js": "npm:^8.42.3" "@types/jest": "npm:^27.4.1" "@types/lodash.get": "npm:^4.4.7" "@types/node": "npm:^22.0.0" + concat-md: "npm:^0.5.1" detect-newline: "npm:^4.0.1" esbuild: "npm:^0.24.0" eslint: "npm:^9.11.0" @@ -4957,8 +3792,6 @@ __metadata: globals: "npm:^15.9.0" husky: "npm:^9.0.11" jest: "npm:^27.0.1" - jsdoc-babel: "npm:^0.5.0" - jsdoc-to-markdown: "npm:^9.0.5" lodash.get: "npm:^4.4.2" parcel: "npm:2.13.0" peggy: "npm:^4.0.2" @@ -4973,6 +3806,8 @@ __metadata: ts-pegjs: "npm:^3.0.0" tsc: "npm:^2.0.4" tsx: "npm:^4.10.5" + typedoc: "npm:^0.26.11" + typedoc-plugin-markdown: "npm:^4.2.10" typescript: "npm:^5.6.2" typescript-eslint: "npm:^8.6.0" languageName: unknown @@ -5110,32 +3945,10 @@ __metadata: languageName: node linkType: hard -"command-line-args@npm:^6.0.1": - version: 6.0.1 - resolution: "command-line-args@npm:6.0.1" - dependencies: - array-back: "npm:^6.2.2" - find-replace: "npm:^5.0.2" - lodash.camelcase: "npm:^4.3.0" - typical: "npm:^7.2.0" - peerDependencies: - "@75lb/nature": "*" - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/45556284f60db8d258fa262a0532ce7eadeb87da3475a5c39191b5c208c02a726f84a117c71d91fe3600f764f77bd5269e0c77444fb3eed4525be610802dcef4 - languageName: node - linkType: hard - -"command-line-usage@npm:^7.0.3": - version: 7.0.3 - resolution: "command-line-usage@npm:7.0.3" - dependencies: - array-back: "npm:^6.2.2" - chalk-template: "npm:^0.4.0" - table-layout: "npm:^4.1.0" - typical: "npm:^7.1.1" - checksum: 10c0/444a3e3c6fcbdcb5802de0fd2864ea5aef83eeeb3a825fd24846b996503d4b4140e75aeb2939b3430a06407f3acc02b76b3e08dafb3a3092d22fdcced0ecb0b0 +"comma-separated-tokens@npm:^2.0.0": + version: 2.0.3 + resolution: "comma-separated-tokens@npm:2.0.3" + checksum: 10c0/91f90f1aae320f1755d6957ef0b864fe4f54737f3313bd95e0802686ee2ca38bff1dd381964d00ae5db42912dd1f4ae5c2709644e82706ffc6f6842a813cdd67 languageName: node linkType: hard @@ -5146,20 +3959,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^6.2.0": - version: 6.2.1 - resolution: "commander@npm:6.2.1" - checksum: 10c0/85748abd9d18c8bc88febed58b98f66b7c591d9b5017cad459565761d7b29ca13b7783ea2ee5ce84bf235897333706c4ce29adf1ce15c8252780e7000e2ce9ea - languageName: node - linkType: hard - -"common-sequence@npm:^2.0.2": - version: 2.0.2 - resolution: "common-sequence@npm:2.0.2" - checksum: 10c0/bdde74376ea087142d9d53c59a99ed3710beebcc9c2ee2ba544f33e394f5f05c446337b56d89ca049e196d60212a47768a5d7df1429fb4ff8cca9b5645f0a236 - languageName: node - linkType: hard - "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -5167,12 +3966,19 @@ __metadata: languageName: node linkType: hard -"config-master@npm:^3.1.0": - version: 3.1.0 - resolution: "config-master@npm:3.1.0" - dependencies: - walk-back: "npm:^2.0.1" - checksum: 10c0/e6d70a99b5e2285deccdc3fb26355bb36486ffdb3199885c898e146f9d4291a5653399345de89c5075a41125f6b365263a69e56bc253874c676b73ebea43355a +"concat-md@npm:^0.5.1": + version: 0.5.1 + resolution: "concat-md@npm:0.5.1" + dependencies: + doctoc: "npm:^2.2.1" + front-matter: "npm:^4.0.2" + globby: "npm:^11.1.0" + lodash.startcase: "npm:^4.4.0" + meow: "npm:^9.0.0" + transform-markdown-links: "npm:^2.0.0" + bin: + concat-md: dist/bin/concat-md.js + checksum: 10c0/d72eea41512169d92b174f88c950510a04960ba5b1cc4c35071cebaaa33101a7a3466bb47035220fd0eaea77d0dc8b703036adf2ec007938419c2f8479803a94 languageName: node linkType: hard @@ -5199,15 +4005,6 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.38.0, core-js-compat@npm:^3.38.1": - version: 3.38.1 - resolution: "core-js-compat@npm:3.38.1" - dependencies: - browserslist: "npm:^4.23.3" - checksum: 10c0/d8bc8a35591fc5fbf3e376d793f298ec41eb452619c7ef9de4ea59b74be06e9fda799e0dcbf9ba59880dae87e3b41fb191d744ffc988315642a1272bb9442b31 - languageName: node - linkType: hard - "cosmiconfig@npm:^7.0.1": version: 7.0.1 resolution: "cosmiconfig@npm:7.0.1" @@ -5279,13 +4076,6 @@ __metadata: languageName: node linkType: hard -"current-module-paths@npm:^1.1.2": - version: 1.1.2 - resolution: "current-module-paths@npm:1.1.2" - checksum: 10c0/04915ee6d76639a89eb3eb73ff7f92ebdc3dc9fda878e545585c8448ea3bba386031cfbdc534258838493f597d22f11fabed90afb15e60e904d51fd7e4af2647 - languageName: node - linkType: hard - "data-uri-to-buffer@npm:^6.0.2": version: 6.0.2 resolution: "data-uri-to-buffer@npm:6.0.2" @@ -5304,6 +4094,39 @@ __metadata: languageName: node linkType: hard +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10c0/8984119e59dbed906a11fcfb417d7d861936f16697a0e7216fe2c6c810f6b5e8f4a5281e73f2c28e8e9259027190ac4a33e2a65fdd7fa86ac06b76e838918583 + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10c0/b7d9e48a0cf5aefed9ab7d123559917b2d7e0d65531f43b2fd95b9d3a6b46042dd3fca597c42bba384e66b70d7ad66ff23932f8367b241f53d93af42cfe04ec2 + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10c0/21b0d2e53fd6e20cc4257c873bf6d36d77bd6185624b84076c0a1ddaa757b49aaf076254006341d35568e89f52eecd1ccb1a502cfb620f2beca04f48a6a62a8f + languageName: node + linkType: hard + "debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" @@ -5316,7 +4139,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.2, debug@npm:^4.3.7": +"debug@npm:^4.0.0, debug@npm:^4.3.2, debug@npm:^4.3.7": version: 4.3.7 resolution: "debug@npm:4.3.7" dependencies: @@ -5328,6 +4151,23 @@ __metadata: languageName: node linkType: hard +"decamelize-keys@npm:^1.1.0": + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" + dependencies: + decamelize: "npm:^1.1.0" + map-obj: "npm:^1.0.0" + checksum: 10c0/4ca385933127437658338c65fb9aead5f21b28d3dd3ccd7956eb29aab0953b5d3c047fbc207111672220c71ecf7a4d34f36c92851b7bbde6fca1a02c541bdd7d + languageName: node + linkType: hard + +"decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10c0/85c39fe8fbf0482d4a1e224ef0119db5c1897f8503bcef8b826adff7a1b11414972f6fef2d7dec2ee0b4be3863cf64ac1439137ae9e6af23a3d8dcbe26a5b4b2 + languageName: node + linkType: hard + "decimal.js@npm:^10.2.1": version: 10.3.1 resolution: "decimal.js@npm:10.3.1" @@ -5367,7 +4207,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.2.1": +"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -5396,6 +4236,13 @@ __metadata: languageName: node linkType: hard +"dequal@npm:^2.0.0": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888 + languageName: node + linkType: hard + "detect-libc@npm:^1.0.3": version: 1.0.3 resolution: "detect-libc@npm:1.0.3" @@ -5426,6 +4273,15 @@ __metadata: languageName: node linkType: hard +"devlop@npm:^1.0.0": + version: 1.1.0 + resolution: "devlop@npm:1.1.0" + dependencies: + dequal: "npm:^2.0.0" + checksum: 10c0/e0928ab8f94c59417a2b8389c45c55ce0a02d9ac7fd74ef62d01ba48060129e1d594501b77de01f3eeafc7cb00773819b0df74d96251cf20b31c5b3071f45c0e + languageName: node + linkType: hard + "devtools-protocol@npm:0.0.1367902": version: 0.0.1367902 resolution: "devtools-protocol@npm:0.0.1367902" @@ -5447,23 +4303,28 @@ __metadata: languageName: node linkType: hard -"dmd@npm:^7.0.7": - version: 7.0.7 - resolution: "dmd@npm:7.0.7" +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" dependencies: - array-back: "npm:^6.2.2" - cache-point: "npm:^3.0.0" - common-sequence: "npm:^2.0.2" - file-set: "npm:^5.2.2" - handlebars: "npm:^4.7.8" - marked: "npm:^4.3.0" - walk-back: "npm:^5.1.1" - peerDependencies: - "@75lb/nature": "*" - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/b1a4ebf4dc033eb1dfcbc8de3a0607337fdce8cd65ac26eb19a6d35d0e9a612b63cb88d66317a7b25073dc85bcd58008da55aebf271b2fc86ad2eca5d3478ca1 + path-type: "npm:^4.0.0" + checksum: 10c0/dcac00920a4d503e38bb64001acb19df4efc14536ada475725e12f52c16777afdee4db827f55f13a908ee7efc0cb282e2e3dbaeeb98c0993dd93d1802d3bf00c + languageName: node + linkType: hard + +"doctoc@npm:^2.2.1": + version: 2.2.1 + resolution: "doctoc@npm:2.2.1" + dependencies: + "@textlint/markdown-to-ast": "npm:^12.1.1" + anchor-markdown-header: "npm:^0.6.0" + htmlparser2: "npm:^7.2.0" + minimist: "npm:^1.2.6" + underscore: "npm:^1.13.2" + update-section: "npm:^0.3.3" + bin: + doctoc: doctoc.js + checksum: 10c0/92fd2d67111a19a29dab538b3cc6fe0f21ee4875dfbefa298a45720a7885c37f614fee24f7e22fbe0e7762b8789e8440ae5121767ebb42565a2f9f9aea81c2ea languageName: node linkType: hard @@ -5579,13 +4440,6 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.601": - version: 1.4.610 - resolution: "electron-to-chromium@npm:1.4.610" - checksum: 10c0/b2f228a62fadb05057885f584f43558738cd547eade5b1ee819491a8420faf3711bdc7ce9bad7b1beb9c7e2ea9f9ffed690b07272cf58fb6e07ddaec1bbee8b8 - languageName: node - linkType: hard - "electron-to-chromium@npm:^1.4.84": version: 1.4.118 resolution: "electron-to-chromium@npm:1.4.118" @@ -5600,13 +4454,6 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.5.4": - version: 1.5.13 - resolution: "electron-to-chromium@npm:1.5.13" - checksum: 10c0/1d88ac39447e1d718c4296f92fe89836df4688daf2d362d6c49108136795f05a56dd9c950f1c6715e0395fa037c3b5f5ea686c543fdc90e6d74a005877c45022 - languageName: node - linkType: hard - "emittery@npm:^0.8.1": version: 0.8.1 resolution: "emittery@npm:0.8.1" @@ -5614,6 +4461,13 @@ __metadata: languageName: node linkType: hard +"emoji-regex-xs@npm:^1.0.0": + version: 1.0.0 + resolution: "emoji-regex-xs@npm:1.0.0" + checksum: 10c0/1082de006991eb05a3324ef0efe1950c7cdf66efc01d4578de82b0d0d62add4e55e97695a8a7eeda826c305081562dc79b477ddf18d886da77f3ba08c4b940a0 + languageName: node + linkType: hard + "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -5628,6 +4482,13 @@ __metadata: languageName: node linkType: hard +"emoji-regex@npm:~10.1.0": + version: 10.1.0 + resolution: "emoji-regex@npm:10.1.0" + checksum: 10c0/3b403b03f52d7ce1f095a76116b4bc18a46d418a8ef819a50b5fd2c4d121e152e98b6401149737a51ce7b7aeb67405f7ce05937712352665a174285fbc452bb1 + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -5690,6 +4551,60 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.5": + version: 1.23.5 + resolution: "es-abstract@npm:1.23.5" + dependencies: + array-buffer-byte-length: "npm:^1.0.1" + arraybuffer.prototype.slice: "npm:^1.0.3" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + data-view-buffer: "npm:^1.0.1" + data-view-byte-length: "npm:^1.0.1" + data-view-byte-offset: "npm:^1.0.0" + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-set-tostringtag: "npm:^2.0.3" + es-to-primitive: "npm:^1.2.1" + function.prototype.name: "npm:^1.1.6" + get-intrinsic: "npm:^1.2.4" + get-symbol-description: "npm:^1.0.2" + globalthis: "npm:^1.0.4" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.2" + internal-slot: "npm:^1.0.7" + is-array-buffer: "npm:^3.0.4" + is-callable: "npm:^1.2.7" + is-data-view: "npm:^1.0.1" + is-negative-zero: "npm:^2.0.3" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.3" + is-string: "npm:^1.0.7" + is-typed-array: "npm:^1.1.13" + is-weakref: "npm:^1.0.2" + object-inspect: "npm:^1.13.3" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.5" + regexp.prototype.flags: "npm:^1.5.3" + safe-array-concat: "npm:^1.1.2" + safe-regex-test: "npm:^1.0.3" + string.prototype.trim: "npm:^1.2.9" + string.prototype.trimend: "npm:^1.0.8" + string.prototype.trimstart: "npm:^1.0.8" + typed-array-buffer: "npm:^1.0.2" + typed-array-byte-length: "npm:^1.0.1" + typed-array-byte-offset: "npm:^1.0.2" + typed-array-length: "npm:^1.0.6" + unbox-primitive: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10c0/1f6f91da9cf7ee2c81652d57d3046621d598654d1d1b05c1578bafe5c4c2d3d69513901679bdca2de589f620666ec21de337e4935cec108a4ed0871d5ef04a5d + languageName: node + linkType: hard + "es-define-property@npm:^1.0.0": version: 1.0.0 resolution: "es-define-property@npm:1.0.0" @@ -5699,7 +4614,7 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.3.0": +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 @@ -5715,6 +4630,28 @@ __metadata: languageName: node linkType: hard +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" + dependencies: + get-intrinsic: "npm:^1.2.4" + has-tostringtag: "npm:^1.0.2" + hasown: "npm:^2.0.1" + checksum: 10c0/f22aff1585eb33569c326323f0b0d175844a1f11618b86e193b386f8be0ea9474cfbe46df39c45d959f7aa8f6c06985dc51dd6bce5401645ec5a74c4ceaa836a + languageName: node + linkType: hard + +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" + dependencies: + is-callable: "npm:^1.1.4" + is-date-object: "npm:^1.0.1" + is-symbol: "npm:^1.0.2" + checksum: 10c0/0886572b8dc075cb10e50c0af62a03d03a68e1e69c388bd4f10c0649ee41b1fbb24840a1b7e590b393011b5cdbe0144b776da316762653685432df37d6de60f1 + languageName: node + linkType: hard + "esbuild@npm:^0.24.0": version: 0.24.0 resolution: "esbuild@npm:0.24.0" @@ -6191,6 +5128,13 @@ __metadata: languageName: node linkType: hard +"extend@npm:^3.0.0": + version: 3.0.2 + resolution: "extend@npm:3.0.2" + checksum: 10c0/73bf6e27406e80aa3e85b0d1c4fd987261e628064e170ca781125c0b635a3dabad5e05adbf07595ea0cf1e6c5396cacb214af933da7cbaf24fe75ff14818e8f9 + languageName: node + linkType: hard + "extract-zip@npm:^2.0.1": version: 2.0.1 resolution: "extract-zip@npm:2.0.1" @@ -6222,7 +5166,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.3.2": +"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -6258,6 +5202,15 @@ __metadata: languageName: node linkType: hard +"fault@npm:^1.0.0": + version: 1.0.4 + resolution: "fault@npm:1.0.4" + dependencies: + format: "npm:^0.2.0" + checksum: 10c0/c86c11500c1b676787296f31ade8473adcc6784f118f07c1a9429730b6288d0412f96e069ce010aa57e4f65a9cccb5abee8868bbe3c5f10de63b20482c9baebd + languageName: node + linkType: hard + "fb-watchman@npm:^2.0.0": version: 2.0.1 resolution: "fb-watchman@npm:2.0.1" @@ -6278,25 +5231,10 @@ __metadata: "file-entry-cache@npm:^8.0.0": version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 - languageName: node - linkType: hard - -"file-set@npm:^5.2.2": - version: 5.2.2 - resolution: "file-set@npm:5.2.2" + resolution: "file-entry-cache@npm:8.0.0" dependencies: - array-back: "npm:^6.2.2" - fast-glob: "npm:^3.3.2" - peerDependencies: - "@75lb/nature": "*" - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/e6cc401f3bfc17dfbad180c294197fc8d466718d01bc33cf972dba5e4cf636566a1abcd51dd88fd9a4cdf56000591c721908cf50401887aece16963d88e4754b + flat-cache: "npm:^4.0.0" + checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 languageName: node linkType: hard @@ -6318,18 +5256,6 @@ __metadata: languageName: node linkType: hard -"find-replace@npm:^5.0.1, find-replace@npm:^5.0.2": - version: 5.0.2 - resolution: "find-replace@npm:5.0.2" - peerDependencies: - "@75lb/nature": "*" - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/25db7167e8767b0683251a985af82e29b0ac26003fe2cd6ddd86e4f2c83fc10d97a81c6f6686034d8c2b9ee88bc53547bf86cc103479a7323342da5ace9f6504 - languageName: node - linkType: hard - "find-up@npm:^4.0.0, find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" @@ -6367,6 +5293,15 @@ __metadata: languageName: node linkType: hard +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: "npm:^1.1.3" + checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -6388,6 +5323,22 @@ __metadata: languageName: node linkType: hard +"format@npm:^0.2.0": + version: 0.2.2 + resolution: "format@npm:0.2.2" + checksum: 10c0/6032ba747541a43abf3e37b402b2f72ee08ebcb58bf84d816443dd228959837f1cddf1e8775b29fa27ff133f4bd146d041bfca5f9cf27f048edf3d493cf8fee6 + languageName: node + linkType: hard + +"front-matter@npm:^4.0.2": + version: 4.0.2 + resolution: "front-matter@npm:4.0.2" + dependencies: + js-yaml: "npm:^3.13.1" + checksum: 10c0/7a0df5ca37428dd563c057bc17a8940481fe53876609bcdc443a02ce463c70f1842c7cb4628b80916de46a253732794b36fb6a31105db0f185698a93acee4011 + languageName: node + linkType: hard + "fs-extra@npm:^11.2.0": version: 11.2.0 resolution: "fs-extra@npm:11.2.0" @@ -6417,13 +5368,6 @@ __metadata: languageName: node linkType: hard -"fs-readdir-recursive@npm:^1.1.0": - version: 1.1.0 - resolution: "fs-readdir-recursive@npm:1.1.0" - checksum: 10c0/7e190393952143e674b6d1ad4abcafa1b5d3e337fcc21b0cb051079a7140a54617a7df193d562ef9faf21bd7b2148a38601b3d5c16261fa76f278d88dc69989c - languageName: node - linkType: hard - "fs.realpath@npm:^1.0.0": version: 1.0.0 resolution: "fs.realpath@npm:1.0.0" @@ -6431,7 +5375,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": +"fsevents@npm:^2.3.2": version: 2.3.2 resolution: "fsevents@npm:2.3.2" dependencies: @@ -6451,7 +5395,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" dependencies: @@ -6476,6 +5420,25 @@ __metadata: languageName: node linkType: hard +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + functions-have-names: "npm:^1.2.3" + checksum: 10c0/9eae11294905b62cb16874adb4fc687927cda3162285e0ad9612e6a1d04934005d46907362ea9cdb7428edce05a2f2c3dabc3b2d21e9fd343e9bb278230ad94b + languageName: node + linkType: hard + +"functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca + languageName: node + linkType: hard + "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -6490,7 +5453,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -6533,6 +5496,17 @@ __metadata: languageName: node linkType: hard +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.5" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + checksum: 10c0/867be6d63f5e0eb026cb3b0ef695ec9ecf9310febb041072d2e142f260bd91ced9eeb426b3af98791d1064e324e653424afa6fd1af17dee373bea48ae03162bc + languageName: node + linkType: hard + "get-tsconfig@npm:^4.7.5": version: 4.7.5 resolution: "get-tsconfig@npm:4.7.5" @@ -6554,7 +5528,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -6587,7 +5561,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.0, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.2.0": +"glob@npm:^7.0.0, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -6631,6 +5605,30 @@ __metadata: languageName: node linkType: hard +"globalthis@npm:^1.0.4": + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" + dependencies: + define-properties: "npm:^1.2.1" + gopd: "npm:^1.0.1" + checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 + languageName: node + linkType: hard + +"globby@npm:^11.1.0": + version: 11.1.0 + resolution: "globby@npm:11.1.0" + dependencies: + array-union: "npm:^2.1.0" + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.2.9" + ignore: "npm:^5.2.0" + merge2: "npm:^1.4.1" + slash: "npm:^3.0.0" + checksum: 10c0/b39511b4afe4bd8a7aead3a27c4ade2b9968649abab0a6c28b1a90141b96ca68ca5db1302f7c7bd29eab66bf51e13916b8e0a3d0ac08f75e1e84a39b35691189 + languageName: node + linkType: hard + "gopd@npm:^1.0.1": version: 1.0.1 resolution: "gopd@npm:1.0.1" @@ -6647,7 +5645,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.2.9": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" checksum: 10c0/4223a833e38e1d0d2aea630c2433cfb94ddc07dfc11d511dbd6be1d16688c5be848acc31f9a5d0d0ddbfb56d2ee5a6ae0278aceeb0ca6a13f27e06b9956fb952 @@ -6661,21 +5659,17 @@ __metadata: languageName: node linkType: hard -"handlebars@npm:^4.7.8": - version: 4.7.8 - resolution: "handlebars@npm:4.7.8" - dependencies: - minimist: "npm:^1.2.5" - neo-async: "npm:^2.6.2" - source-map: "npm:^0.6.1" - uglify-js: "npm:^3.1.4" - wordwrap: "npm:^1.0.0" - dependenciesMeta: - uglify-js: - optional: true - bin: - handlebars: bin/handlebars - checksum: 10c0/7aff423ea38a14bb379316f3857fe0df3c5d66119270944247f155ba1f08e07a92b340c58edaa00cfe985c21508870ee5183e0634dcb53dd405f35c93ef7f10d +"hard-rejection@npm:^2.1.0": + version: 2.1.0 + resolution: "hard-rejection@npm:2.1.0" + checksum: 10c0/febc3343a1ad575aedcc112580835b44a89a89e01f400b4eda6e8110869edfdab0b00cd1bd4c3bfec9475a57e79e0b355aecd5be46454b6a62b9a359af60e564 + languageName: node + linkType: hard + +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 10c0/724eb1485bfa3cdff6f18d95130aa190561f00b3fcf9f19dc640baf8176b5917c143b81ec2123f8cddb6c05164a198c94b13e1377c497705ccc8e1a80306e83b languageName: node linkType: hard @@ -6702,20 +5696,29 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.1": +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": version: 1.0.3 resolution: "has-proto@npm:1.0.3" checksum: 10c0/35a6989f81e9f8022c2f4027f8b48a552de714938765d019dbea6bb547bd49ce5010a3c7c32ec6ddac6e48fc546166a3583b128f5a7add8b058a6d8b4afec205 languageName: node linkType: hard -"has-symbols@npm:^1.0.3": +"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 languageName: node linkType: hard +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" + dependencies: + has-symbols: "npm:^1.0.3" + checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c + languageName: node + linkType: hard + "hasown@npm:^2.0.0": version: 2.0.0 resolution: "hasown@npm:2.0.0" @@ -6725,6 +5728,59 @@ __metadata: languageName: node linkType: hard +"hasown@npm:^2.0.1, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 + languageName: node + linkType: hard + +"hast-util-to-html@npm:^9.0.3": + version: 9.0.3 + resolution: "hast-util-to-html@npm:9.0.3" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + hast-util-whitespace: "npm:^3.0.0" + html-void-elements: "npm:^3.0.0" + mdast-util-to-hast: "npm:^13.0.0" + property-information: "npm:^6.0.0" + space-separated-tokens: "npm:^2.0.0" + stringify-entities: "npm:^4.0.0" + zwitch: "npm:^2.0.4" + checksum: 10c0/af938a03034727f6c944d3855732d72f71a3bcd920d36b9ba3e083df2217faf81713740934db64673aca69d76b60abe80052e47c0702323fd0bd5dce03b67b8d + languageName: node + linkType: hard + +"hast-util-whitespace@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-whitespace@npm:3.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10c0/b898bc9fe27884b272580d15260b6bbdabe239973a147e97fa98c45fa0ffec967a481aaa42291ec34fb56530dc2d484d473d7e2bae79f39c83f3762307edfea8 + languageName: node + linkType: hard + +"hosted-git-info@npm:^2.1.4": + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: 10c0/317cbc6b1bbbe23c2a40ae23f3dafe9fa349ce42a89a36f930e3f9c0530c179a3882d2ef1e4141a4c3674d6faaea862138ec55b43ad6f75e387fda2483a13c70 + languageName: node + linkType: hard + +"hosted-git-info@npm:^4.0.1": + version: 4.1.0 + resolution: "hosted-git-info@npm:4.1.0" + dependencies: + lru-cache: "npm:^6.0.0" + checksum: 10c0/150fbcb001600336d17fdbae803264abed013548eea7946c2264c49ebe2ebd8c4441ba71dd23dd8e18c65de79d637f98b22d4760ba5fb2e0b15d62543d0fff07 + languageName: node + linkType: hard + "html-encoding-sniffer@npm:^2.0.1": version: 2.0.1 resolution: "html-encoding-sniffer@npm:2.0.1" @@ -6741,6 +5797,13 @@ __metadata: languageName: node linkType: hard +"html-void-elements@npm:^3.0.0": + version: 3.0.0 + resolution: "html-void-elements@npm:3.0.0" + checksum: 10c0/a8b9ec5db23b7c8053876dad73a0336183e6162bf6d2677376d8b38d654fdc59ba74fdd12f8812688f7db6fad451210c91b300e472afc0909224e0a44c8610d2 + languageName: node + linkType: hard + "htmlnano@npm:^2.0.0": version: 2.0.2 resolution: "htmlnano@npm:2.0.2" @@ -6778,7 +5841,7 @@ __metadata: languageName: node linkType: hard -"htmlparser2@npm:^7.1.1": +"htmlparser2@npm:^7.1.1, htmlparser2@npm:^7.2.0": version: 7.2.0 resolution: "htmlparser2@npm:7.2.0" dependencies: @@ -6961,6 +6024,17 @@ __metadata: languageName: node linkType: hard +"internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" + dependencies: + es-errors: "npm:^1.3.0" + hasown: "npm:^2.0.0" + side-channel: "npm:^1.0.4" + checksum: 10c0/f8b294a4e6ea3855fc59551bbf35f2b832cf01fd5e6e2a97f5c201a071cc09b49048f856e484b67a6c721da5e55736c5b6ddafaf19e2dbeb4a3ff1821680de6c + languageName: node + linkType: hard + "interpret@npm:^1.0.0": version: 1.4.0 resolution: "interpret@npm:1.4.0" @@ -6978,6 +6052,33 @@ __metadata: languageName: node linkType: hard +"is-alphabetical@npm:^1.0.0": + version: 1.0.4 + resolution: "is-alphabetical@npm:1.0.4" + checksum: 10c0/1505b1de5a1fd74022c05fb21b0e683a8f5229366bac8dc4d34cf6935bcfd104d1125a5e6b083fb778847629f76e5bdac538de5367bdf2b927a1356164e23985 + languageName: node + linkType: hard + +"is-alphanumerical@npm:^1.0.0": + version: 1.0.4 + resolution: "is-alphanumerical@npm:1.0.4" + dependencies: + is-alphabetical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + checksum: 10c0/d623abae7130a7015c6bf33d99151d4e7005572fd170b86568ff4de5ae86ac7096608b87dd4a1d4dbbd497e392b6396930ba76c9297a69455909cebb68005905 + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.4": + version: 3.0.4 + resolution: "is-array-buffer@npm:3.0.4" + dependencies: + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.2.1" + checksum: 10c0/42a49d006cc6130bc5424eae113e948c146f31f9d24460fc0958f855d9d810e6fd2e4519bf19aab75179af9c298ea6092459d8cafdec523cd19e529b26eab860 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -6985,12 +6086,45 @@ __metadata: languageName: node linkType: hard -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" +"is-async-function@npm:^2.0.0": + version: 2.0.0 + resolution: "is-async-function@npm:2.0.0" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/787bc931576aad525d751fc5ce211960fe91e49ac84a5c22d6ae0bc9541945fbc3f686dc590c3175722ce4f6d7b798a93f6f8ff4847fdb2199aea6f4baf5d668 + languageName: node + linkType: hard + +"is-bigint@npm:^1.0.1": + version: 1.0.4 + resolution: "is-bigint@npm:1.0.4" + dependencies: + has-bigints: "npm:^1.0.1" + checksum: 10c0/eb9c88e418a0d195ca545aff2b715c9903d9b0a5033bc5922fec600eb0c3d7b1ee7f882dbf2e0d5a6e694e42391be3683e4368737bd3c4a77f8ac293e7773696 + languageName: node + linkType: hard + +"is-boolean-object@npm:^1.1.0": + version: 1.1.2 + resolution: "is-boolean-object@npm:1.1.2" dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/6090587f8a8a8534c0f816da868bc94f32810f08807aa72fa7e79f7e11c466d281486ffe7a788178809c2aa71fe3e700b167fe80dd96dad68026bfff8ebf39f7 + languageName: node + linkType: hard + +"is-buffer@npm:^2.0.0": + version: 2.0.5 + resolution: "is-buffer@npm:2.0.5" + checksum: 10c0/e603f6fced83cf94c53399cff3bda1a9f08e391b872b64a73793b0928be3e5f047f2bcece230edb7632eaea2acdbfcb56c23b33d8a20c820023b230f1485679a + languageName: node + linkType: hard + +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f languageName: node linkType: hard @@ -7003,6 +6137,40 @@ __metadata: languageName: node linkType: hard +"is-core-module@npm:^2.5.0": + version: 2.15.1 + resolution: "is-core-module@npm:2.15.1" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10c0/53432f10c69c40bfd2fa8914133a68709ff9498c86c3bf5fca3cdf3145a56fd2168cbf4a43b29843a6202a120a5f9c5ffba0a4322e1e3441739bc0b641682612 + languageName: node + linkType: hard + +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: "npm:^1.1.13" + checksum: 10c0/a3e6ec84efe303da859107aed9b970e018e2bee7ffcb48e2f8096921a493608134240e672a2072577e5f23a729846241d9634806e8a0e51d9129c56d5f65442d + languageName: node + linkType: hard + +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": + version: 1.0.5 + resolution: "is-date-object@npm:1.0.5" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/eed21e5dcc619c48ccef804dfc83a739dbb2abee6ca202838ee1bd5f760fe8d8a93444f0d49012ad19bb7c006186e2884a1b92f6e1c056da7fd23d0a9ad5992e + languageName: node + linkType: hard + +"is-decimal@npm:^1.0.0": + version: 1.0.4 + resolution: "is-decimal@npm:1.0.4" + checksum: 10c0/a4ad53c4c5c4f5a12214e7053b10326711f6a71f0c63ba1314a77bd71df566b778e4ebd29f9fb6815f07a4dc50c3767fb19bd6fc9fa05e601410f1d64ffeac48 + languageName: node + linkType: hard + "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -7010,6 +6178,15 @@ __metadata: languageName: node linkType: hard +"is-finalizationregistry@npm:^1.1.0": + version: 1.1.0 + resolution: "is-finalizationregistry@npm:1.1.0" + dependencies: + call-bind: "npm:^1.0.7" + checksum: 10c0/1cd94236bfb6e060fe2b973c8726a2782727f7d495b3e8e1d51d3e619c5a3345413706f555956eb5b12af15eba0414118f64a1b19d793ec36b5e6767a13836ac + languageName: node + linkType: hard + "is-fullwidth-code-point@npm:^3.0.0": version: 3.0.0 resolution: "is-fullwidth-code-point@npm:3.0.0" @@ -7017,61 +6194,200 @@ __metadata: languageName: node linkType: hard -"is-generator-fn@npm:^2.0.0": - version: 2.1.0 - resolution: "is-generator-fn@npm:2.1.0" - checksum: 10c0/2957cab387997a466cd0bf5c1b6047bd21ecb32bdcfd8996b15747aa01002c1c88731802f1b3d34ac99f4f6874b626418bd118658cf39380fe5fff32a3af9c4d +"is-generator-fn@npm:^2.0.0": + version: 2.1.0 + resolution: "is-generator-fn@npm:2.1.0" + checksum: 10c0/2957cab387997a466cd0bf5c1b6047bd21ecb32bdcfd8996b15747aa01002c1c88731802f1b3d34ac99f4f6874b626418bd118658cf39380fe5fff32a3af9c4d + languageName: node + linkType: hard + +"is-generator-function@npm:^1.0.10": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/df03514df01a6098945b5a0cfa1abff715807c8e72f57c49a0686ad54b3b74d394e2d8714e6f709a71eb00c9630d48e73ca1796c1ccc84ac95092c1fecc0d98b + languageName: node + linkType: hard + +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a + languageName: node + linkType: hard + +"is-hexadecimal@npm:^1.0.0": + version: 1.0.4 + resolution: "is-hexadecimal@npm:1.0.4" + checksum: 10c0/ec4c64e5624c0f240922324bc697e166554f09d3ddc7633fc526084502626445d0a871fbd8cae52a9844e83bd0bb414193cc5a66806d7b2867907003fc70c5ea + languageName: node + linkType: hard + +"is-json@npm:^2.0.1": + version: 2.0.1 + resolution: "is-json@npm:2.0.1" + checksum: 10c0/49233aa560396e6365186be2f3a4618bf8b8067c1a97f2a25b8de09a9d7f326985f0163508067abeae5a21c69594a2a537f0147a5c4050ef097c15964e994cb4 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d + languageName: node + linkType: hard + +"is-map@npm:^2.0.3": + version: 2.0.3 + resolution: "is-map@npm:2.0.3" + checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc + languageName: node + linkType: hard + +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: 10c0/bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e + languageName: node + linkType: hard + +"is-number-object@npm:^1.0.4": + version: 1.0.7 + resolution: "is-number-object@npm:1.0.7" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/aad266da1e530f1804a2b7bd2e874b4869f71c98590b3964f9d06cc9869b18f8d1f4778f838ecd2a11011bce20aeecb53cb269ba916209b79c24580416b74b1b + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 + languageName: node + linkType: hard + +"is-plain-obj@npm:^1.1.0": + version: 1.1.0 + resolution: "is-plain-obj@npm:1.1.0" + checksum: 10c0/daaee1805add26f781b413fdf192fc91d52409583be30ace35c82607d440da63cc4cac0ac55136716688d6c0a2c6ef3edb2254fecbd1fe06056d6bd15975ee8c + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.0.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10c0/e5c9814cdaa627a9ad0a0964ded0e0491bfd9ace405c49a5d63c88b30a162f1512c069d5b80997893c4d0181eadc3fed02b4ab4b81059aba5620bfcdfdeb9c53 + languageName: node + linkType: hard + +"is-potential-custom-element-name@npm:^1.0.1": + version: 1.0.1 + resolution: "is-potential-custom-element-name@npm:1.0.1" + checksum: 10c0/b73e2f22bc863b0939941d369486d308b43d7aef1f9439705e3582bfccaa4516406865e32c968a35f97a99396dac84e2624e67b0a16b0a15086a785e16ce7db9 + languageName: node + linkType: hard + +"is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" + dependencies: + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/bb72aae604a69eafd4a82a93002058c416ace8cde95873589a97fc5dac96a6c6c78a9977d487b7b95426a8f5073969124dd228f043f9f604f041f32fcc465fc1 + languageName: node + linkType: hard + +"is-set@npm:^2.0.3": + version: 2.0.3 + resolution: "is-set@npm:2.0.3" + checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 + languageName: node + linkType: hard + +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": + version: 1.0.3 + resolution: "is-shared-array-buffer@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.7" + checksum: 10c0/adc11ab0acbc934a7b9e5e9d6c588d4ec6682f6fea8cda5180721704fa32927582ede5b123349e32517fdadd07958973d24716c80e7ab198970c47acc09e59c7 + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10c0/7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5 languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/905f805cbc6eedfa678aaa103ab7f626aac9ebbdc8737abb5243acaa61d9820f8edc5819106b8fcd1839e33db21de9f0116ae20de380c8382d16dc2a601921f6 languageName: node linkType: hard -"is-json@npm:^2.0.1": - version: 2.0.1 - resolution: "is-json@npm:2.0.1" - checksum: 10c0/49233aa560396e6365186be2f3a4618bf8b8067c1a97f2a25b8de09a9d7f326985f0163508067abeae5a21c69594a2a537f0147a5c4050ef097c15964e994cb4 +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": + version: 1.0.4 + resolution: "is-symbol@npm:1.0.4" + dependencies: + has-symbols: "npm:^1.0.2" + checksum: 10c0/9381dd015f7c8906154dbcbf93fad769de16b4b961edc94f88d26eb8c555935caa23af88bda0c93a18e65560f6d7cca0fd5a3f8a8e1df6f1abbb9bead4502ef7 languageName: node linkType: hard -"is-lambda@npm:^1.0.1": - version: 1.0.1 - resolution: "is-lambda@npm:1.0.1" - checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d +"is-typed-array@npm:^1.1.13": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" + dependencies: + which-typed-array: "npm:^1.1.14" + checksum: 10c0/fa5cb97d4a80e52c2cc8ed3778e39f175a1a2ae4ddf3adae3187d69586a1fd57cfa0b095db31f66aa90331e9e3da79184cea9c6abdcd1abc722dc3c3edd51cca languageName: node linkType: hard -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10c0/4c096275ba041a17a13cca33ac21c16bc4fd2d7d7eb94525e7cd2c2f2c1a3ab956e37622290642501ff4310601e413b675cf399ad6db49855527d2163b3eeeec languageName: node linkType: hard -"is-potential-custom-element-name@npm:^1.0.1": - version: 1.0.1 - resolution: "is-potential-custom-element-name@npm:1.0.1" - checksum: 10c0/b73e2f22bc863b0939941d369486d308b43d7aef1f9439705e3582bfccaa4516406865e32c968a35f97a99396dac84e2624e67b0a16b0a15086a785e16ce7db9 +"is-weakmap@npm:^2.0.2": + version: 2.0.2 + resolution: "is-weakmap@npm:2.0.2" + checksum: 10c0/443c35bb86d5e6cc5929cd9c75a4024bb0fff9586ed50b092f94e700b89c43a33b186b76dbc6d54f3d3d09ece689ab38dcdc1af6a482cbe79c0f2da0a17f1299 languageName: node linkType: hard -"is-stream@npm:^2.0.0": - version: 2.0.1 - resolution: "is-stream@npm:2.0.1" - checksum: 10c0/7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5 +"is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + checksum: 10c0/1545c5d172cb690c392f2136c23eec07d8d78a7f57d0e41f10078aa4f5daf5d7f57b6513a67514ab4f073275ad00c9822fc8935e00229d0a2089e1c02685d4b1 languageName: node linkType: hard -"is-typedarray@npm:^1.0.0": - version: 1.0.0 - resolution: "is-typedarray@npm:1.0.0" - checksum: 10c0/4c096275ba041a17a13cca33ac21c16bc4fd2d7d7eb94525e7cd2c2f2c1a3ab956e37622290642501ff4310601e413b675cf399ad6db49855527d2163b3eeeec +"is-weakset@npm:^2.0.3": + version: 2.0.3 + resolution: "is-weakset@npm:2.0.3" + dependencies: + call-bind: "npm:^1.0.7" + get-intrinsic: "npm:^1.2.4" + checksum: 10c0/8ad6141b6a400e7ce7c7442a13928c676d07b1f315ab77d9912920bf5f4170622f43126f111615788f26c3b1871158a6797c862233124507db0bcc33a9537d1a + languageName: node + linkType: hard + +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd languageName: node linkType: hard @@ -7701,15 +7017,6 @@ __metadata: languageName: node linkType: hard -"js2xmlparser@npm:^4.0.2": - version: 4.0.2 - resolution: "js2xmlparser@npm:4.0.2" - dependencies: - xmlcreate: "npm:^2.0.4" - checksum: 10c0/b00de9351649d67d225e21734a08f456a4ecb3c29cafcd3bbecb36a8ab61ec841fad7f425bed50e21936fe387f472e49cfe75ce71d0beaacb0475b077c88ed39 - languageName: node - linkType: hard - "jsbn@npm:1.1.0": version: 1.1.0 resolution: "jsbn@npm:1.1.0" @@ -7717,105 +7024,6 @@ __metadata: languageName: node linkType: hard -"jsdoc-api@npm:^9.3.4": - version: 9.3.4 - resolution: "jsdoc-api@npm:9.3.4" - dependencies: - array-back: "npm:^6.2.2" - cache-point: "npm:^3.0.0" - current-module-paths: "npm:^1.1.2" - file-set: "npm:^5.2.2" - jsdoc: "npm:^4.0.4" - object-to-spawn-args: "npm:^2.0.1" - walk-back: "npm:^5.1.1" - peerDependencies: - "@75lb/nature": "*" - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/e9452c79c39c1bf0369927d29969db6e4dc9266e9f92192d572d78f25d2fef3ad52a4cc138943338ed68c88991266affcb86396a32fd8a9980ceb4811b7d126a - languageName: node - linkType: hard - -"jsdoc-babel@npm:^0.5.0": - version: 0.5.0 - resolution: "jsdoc-babel@npm:0.5.0" - dependencies: - jsdoc-regex: "npm:^1.0.1" - lodash: "npm:^4.17.10" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/877dfee24aecd5cbbd047097ac831d78bee9dc0f26d18411999977c366c362601d611b318eb7bc5e438de3bc038caa2c3ad7f5f9c1935d2db3cc613dbe0da61b - languageName: node - linkType: hard - -"jsdoc-parse@npm:^6.2.4": - version: 6.2.4 - resolution: "jsdoc-parse@npm:6.2.4" - dependencies: - array-back: "npm:^6.2.2" - find-replace: "npm:^5.0.1" - lodash.omit: "npm:^4.5.0" - sort-array: "npm:^5.0.0" - checksum: 10c0/cabfb58cb97616f77ac8b09d3cf6af0eba79b275c9471c85fe9a887d74c39129e36f0cd222aee51a78adcde29d265863e9ee98771959b6fa8dc23d716d851608 - languageName: node - linkType: hard - -"jsdoc-regex@npm:^1.0.1": - version: 1.0.1 - resolution: "jsdoc-regex@npm:1.0.1" - checksum: 10c0/adb36373e6b55409be6e001ce08cc3c00261e9685cddbb67f1cf19233b810f0bfc0f3aac8248817fd292cf679a8d2c9328b8c1f51466700811ebedf1501d0fba - languageName: node - linkType: hard - -"jsdoc-to-markdown@npm:^9.0.5": - version: 9.0.5 - resolution: "jsdoc-to-markdown@npm:9.0.5" - dependencies: - array-back: "npm:^6.2.2" - command-line-args: "npm:^6.0.1" - command-line-usage: "npm:^7.0.3" - config-master: "npm:^3.1.0" - dmd: "npm:^7.0.7" - jsdoc-api: "npm:^9.3.4" - jsdoc-parse: "npm:^6.2.4" - walk-back: "npm:^5.1.1" - peerDependencies: - "@75lb/nature": "*" - peerDependenciesMeta: - "@75lb/nature": - optional: true - bin: - jsdoc2md: bin/cli.js - checksum: 10c0/8d50def655120f9e88c4d10230e24c68d736b1248f5ed506375af4a76ebc1de8bfe8128cd7d3ce5d206f48b73da11834cde2b3009d49e6a5548a3146a00ec800 - languageName: node - linkType: hard - -"jsdoc@npm:^4.0.4": - version: 4.0.4 - resolution: "jsdoc@npm:4.0.4" - dependencies: - "@babel/parser": "npm:^7.20.15" - "@jsdoc/salty": "npm:^0.2.1" - "@types/markdown-it": "npm:^14.1.1" - bluebird: "npm:^3.7.2" - catharsis: "npm:^0.9.0" - escape-string-regexp: "npm:^2.0.0" - js2xmlparser: "npm:^4.0.2" - klaw: "npm:^3.0.0" - markdown-it: "npm:^14.1.0" - markdown-it-anchor: "npm:^8.6.7" - marked: "npm:^4.0.10" - mkdirp: "npm:^1.0.4" - requizzle: "npm:^0.2.3" - strip-json-comments: "npm:^3.1.0" - underscore: "npm:~1.13.2" - bin: - jsdoc: ./jsdoc.js - checksum: 10c0/437a21ad67629dd9ae63d99b3d8f7c87e2a54559a15744cbdafe55ad6abd19678845e79dc88119035a31eef13a2ecaf1d623989a8b9631060780dcdfdf87c7a3 - languageName: node - linkType: hard - "jsdom@npm:^16.6.0": version: 16.7.0 resolution: "jsdom@npm:16.7.0" @@ -7865,7 +7073,7 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^3.0.2, jsesc@npm:~3.0.2": +"jsesc@npm:^3.0.2": version: 3.0.2 resolution: "jsesc@npm:3.0.2" bin: @@ -7874,15 +7082,6 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:~0.5.0": - version: 0.5.0 - resolution: "jsesc@npm:0.5.0" - bin: - jsesc: bin/jsesc - checksum: 10c0/f93792440ae1d80f091b65f8ceddf8e55c4bb7f1a09dee5dcbdb0db5612c55c0f6045625aa6b7e8edb2e0a4feabd80ee48616dbe2d37055573a84db3d24f96d9 - languageName: node - linkType: hard - "json-buffer@npm:3.0.1": version: 3.0.1 resolution: "json-buffer@npm:3.0.1" @@ -7942,12 +7141,10 @@ __metadata: languageName: node linkType: hard -"klaw@npm:^3.0.0": - version: 3.0.0 - resolution: "klaw@npm:3.0.0" - dependencies: - graceful-fs: "npm:^4.1.9" - checksum: 10c0/8391cf6df6337dce02e44628b620b39412d007eff162d907d37063c23986041d9b5c3558851d473c2fae92c1ccb0fde8864e36f9c55ac339fc469b517a2caa1b +"kind-of@npm:^6.0.3": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 10c0/61cdff9623dabf3568b6445e93e31376bee1cdb93f8ba7033d86022c2a9b1791a1d9510e026e6465ebd701a6dd2f7b0808483ad8838341ac52f003f512e0b4c4 languageName: node linkType: hard @@ -8154,20 +7351,6 @@ __metadata: languageName: node linkType: hard -"lodash.camelcase@npm:^4.3.0": - version: 4.3.0 - resolution: "lodash.camelcase@npm:4.3.0" - checksum: 10c0/fcba15d21a458076dd309fce6b1b4bf611d84a0ec252cb92447c948c533ac250b95d2e00955801ebc367e5af5ed288b996d75d37d2035260a937008e14eaf432 - languageName: node - linkType: hard - -"lodash.debounce@npm:^4.0.8": - version: 4.0.8 - resolution: "lodash.debounce@npm:4.0.8" - checksum: 10c0/762998a63e095412b6099b8290903e0a8ddcb353ac6e2e0f2d7e7d03abd4275fe3c689d88960eb90b0dde4f177554d51a690f22a343932ecbc50a5d111849987 - languageName: node - linkType: hard - "lodash.get@npm:^4.4.2": version: 4.4.2 resolution: "lodash.get@npm:4.4.2" @@ -8189,20 +7372,27 @@ __metadata: languageName: node linkType: hard -"lodash.omit@npm:^4.5.0": - version: 4.5.0 - resolution: "lodash.omit@npm:4.5.0" - checksum: 10c0/3808b9b6faae35177174b6ab327f1177e29c91f1e98dcbccf13a72a6767bba337306449d537a4e0d8a33d2673f10d39bc732e30c4b803274ea0c1168ea60e549 +"lodash.startcase@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.startcase@npm:4.4.0" + checksum: 10c0/bd82aa87a45de8080e1c5ee61128c7aee77bf7f1d86f4ff94f4a6d7438fc9e15e5f03374b947be577a93804c8ad6241f0251beaf1452bf716064eeb657b3a9f0 languageName: node linkType: hard -"lodash@npm:^4.17.10, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.21, lodash@npm:^4.7.0": +"lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c languageName: node linkType: hard +"longest-streak@npm:^2.0.0": + version: 2.0.4 + resolution: "longest-streak@npm:2.0.4" + checksum: 10c0/918fb5104cde537757f44431776d6d828bc091a63ca38a3b3e59a08b88498b4421bf5fd9823ef22b4d186f0234d9943087fa96bd6117d26dedcf6008480fd46a + languageName: node + linkType: hard + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.2.2 resolution: "lru-cache@npm:10.2.2" @@ -8235,13 +7425,10 @@ __metadata: languageName: node linkType: hard -"make-dir@npm:^2.1.0": - version: 2.1.0 - resolution: "make-dir@npm:2.1.0" - dependencies: - pify: "npm:^4.0.1" - semver: "npm:^5.6.0" - checksum: 10c0/ada869944d866229819735bee5548944caef560d7a8536ecbc6536edca28c72add47cc4f6fc39c54fb25d06b58da1f8994cf7d9df7dadea047064749efc085d8 +"lunr@npm:^2.3.9": + version: 2.3.9 + resolution: "lunr@npm:2.3.9" + checksum: 10c0/77d7dbb4fbd602aac161e2b50887d8eda28c0fa3b799159cee380fbb311f1e614219126ecbbd2c3a9c685f1720a8109b3c1ca85cc893c39b6c9cc6a62a1d8a8b languageName: node linkType: hard @@ -8290,13 +7477,17 @@ __metadata: languageName: node linkType: hard -"markdown-it-anchor@npm:^8.6.7": - version: 8.6.7 - resolution: "markdown-it-anchor@npm:8.6.7" - peerDependencies: - "@types/markdown-it": "*" - markdown-it: "*" - checksum: 10c0/f117866488013b7e4085a6b59d12bf62879181aef65ea2851f01ed1b763b8c052580c2c27fa8bd009421886220c6beeb373a65af9e885ce63a36ee9f8dcd0e89 +"map-obj@npm:^1.0.0": + version: 1.0.1 + resolution: "map-obj@npm:1.0.1" + checksum: 10c0/ccca88395e7d38671ed9f5652ecf471ecd546924be2fb900836b9da35e068a96687d96a5f93dcdfa94d9a27d649d2f10a84595590f89a347fb4dda47629dcc52 + languageName: node + linkType: hard + +"map-obj@npm:^4.0.0": + version: 4.3.0 + resolution: "map-obj@npm:4.3.0" + checksum: 10c0/1c19e1c88513c8abdab25c316367154c6a0a6a0f77e3e8c391bb7c0e093aefed293f539d026dc013d86219e5e4c25f23b0003ea588be2101ccd757bacc12d43b languageName: node linkType: hard @@ -8304,54 +7495,325 @@ __metadata: version: 14.1.0 resolution: "markdown-it@npm:14.1.0" dependencies: - argparse: "npm:^2.0.1" - entities: "npm:^4.4.0" - linkify-it: "npm:^5.0.0" - mdurl: "npm:^2.0.0" - punycode.js: "npm:^2.3.1" - uc.micro: "npm:^2.1.0" - bin: - markdown-it: bin/markdown-it.mjs - checksum: 10c0/9a6bb444181d2db7016a4173ae56a95a62c84d4cbfb6916a399b11d3e6581bf1cc2e4e1d07a2f022ae72c25f56db90fbe1e529fca16fbf9541659dc53480d4b4 + argparse: "npm:^2.0.1" + entities: "npm:^4.4.0" + linkify-it: "npm:^5.0.0" + mdurl: "npm:^2.0.0" + punycode.js: "npm:^2.3.1" + uc.micro: "npm:^2.1.0" + bin: + markdown-it: bin/markdown-it.mjs + checksum: 10c0/9a6bb444181d2db7016a4173ae56a95a62c84d4cbfb6916a399b11d3e6581bf1cc2e4e1d07a2f022ae72c25f56db90fbe1e529fca16fbf9541659dc53480d4b4 + languageName: node + linkType: hard + +"markdown-table@npm:^2.0.0": + version: 2.0.0 + resolution: "markdown-table@npm:2.0.0" + dependencies: + repeat-string: "npm:^1.0.0" + checksum: 10c0/f257e0781ea50eb946919df84bdee4ba61f983971b277a369ca7276f89740fd0e2749b9b187163a42df4c48682b71962d4007215ce3523480028f06c11ddc2e6 + languageName: node + linkType: hard + +"mdast-util-find-and-replace@npm:^1.1.0": + version: 1.1.1 + resolution: "mdast-util-find-and-replace@npm:1.1.1" + dependencies: + escape-string-regexp: "npm:^4.0.0" + unist-util-is: "npm:^4.0.0" + unist-util-visit-parents: "npm:^3.0.0" + checksum: 10c0/4b9da583e858146a6553155795ef2f0d37b72b8d20487f75895e01fd240a483fbdb97f5aecd218e8ce598be24edb742c5bcbcba2896d172101529376ef390633 + languageName: node + linkType: hard + +"mdast-util-footnote@npm:^0.1.0": + version: 0.1.7 + resolution: "mdast-util-footnote@npm:0.1.7" + dependencies: + mdast-util-to-markdown: "npm:^0.6.0" + micromark: "npm:~2.11.0" + checksum: 10c0/f75f64cd452b11a1593501cbbe4ea24be5435e31b9fd47a784f07ad9b9bb56611548d3da0d9fc0490b934789c3d67f0aa272e87c4efaf502e8fca9ef95825ee2 + languageName: node + linkType: hard + +"mdast-util-from-markdown@npm:^0.8.0": + version: 0.8.5 + resolution: "mdast-util-from-markdown@npm:0.8.5" + dependencies: + "@types/mdast": "npm:^3.0.0" + mdast-util-to-string: "npm:^2.0.0" + micromark: "npm:~2.11.0" + parse-entities: "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + checksum: 10c0/86e7589e574378817c180f10ab602db844b6b71b7b1769314947a02ef42ac5c1435f5163d02a975ae8cdab8b6e6176acbd9188da1848ddd5f0d5e09d0291c870 + languageName: node + linkType: hard + +"mdast-util-frontmatter@npm:^0.2.0": + version: 0.2.0 + resolution: "mdast-util-frontmatter@npm:0.2.0" + dependencies: + micromark-extension-frontmatter: "npm:^0.2.0" + checksum: 10c0/fd7630e24d668c1a1890b268736567a6f0a547438f68b800f59168292d1c05cf9105724b3a33de4de5f573ea7e8e6f54c39bdca5ea5224435abfe77980579acc + languageName: node + linkType: hard + +"mdast-util-gfm-autolink-literal@npm:^0.1.0, mdast-util-gfm-autolink-literal@npm:^0.1.3": + version: 0.1.3 + resolution: "mdast-util-gfm-autolink-literal@npm:0.1.3" + dependencies: + ccount: "npm:^1.0.0" + mdast-util-find-and-replace: "npm:^1.1.0" + micromark: "npm:^2.11.3" + checksum: 10c0/155665a88a9b11fb5f8b6c5bff1a1e9d30f7381ff8c1864c7ede1eab4e312c51cef1e92e113cda174ebad40181350e555c303fa3293a1dc60b8945818d0af39a + languageName: node + linkType: hard + +"mdast-util-gfm-strikethrough@npm:^0.2.0": + version: 0.2.3 + resolution: "mdast-util-gfm-strikethrough@npm:0.2.3" + dependencies: + mdast-util-to-markdown: "npm:^0.6.0" + checksum: 10c0/1de00913769c252add1f48fea547121d971ef7a8bfe6a89b775dea38aa319e6b10b6f514b492586aa7e660f8880b5c2390e411302a0b2386ed793f914b9eca71 + languageName: node + linkType: hard + +"mdast-util-gfm-table@npm:^0.1.0": + version: 0.1.6 + resolution: "mdast-util-gfm-table@npm:0.1.6" + dependencies: + markdown-table: "npm:^2.0.0" + mdast-util-to-markdown: "npm:~0.6.0" + checksum: 10c0/a3b3fa2f91a44054dbe7e8a4cba1bcaa35255633da7850ad2688c60d1e1825d5d668774f31689d018d9f04cadc68f6055349048192c89a0e6c2ccb91a7ae7d1f + languageName: node + linkType: hard + +"mdast-util-gfm-task-list-item@npm:^0.1.0": + version: 0.1.6 + resolution: "mdast-util-gfm-task-list-item@npm:0.1.6" + dependencies: + mdast-util-to-markdown: "npm:~0.6.0" + checksum: 10c0/6b5b5239f031b630cd433cfd0bb30b7258dfac7d49c86a2c937127bc00fda186f798cf2a671507bcfad00f075d2d8779be9c109549052d98f1b4927e6e12d8be + languageName: node + linkType: hard + +"mdast-util-gfm@npm:^0.1.0": + version: 0.1.2 + resolution: "mdast-util-gfm@npm:0.1.2" + dependencies: + mdast-util-gfm-autolink-literal: "npm:^0.1.0" + mdast-util-gfm-strikethrough: "npm:^0.2.0" + mdast-util-gfm-table: "npm:^0.1.0" + mdast-util-gfm-task-list-item: "npm:^0.1.0" + mdast-util-to-markdown: "npm:^0.6.1" + checksum: 10c0/109c5f3e3340c25ecec5fb0b9b1a4137fb0948ffbc38ed4b85d477f3da471c2a475a84f2cb2569663768d6967aedf0f3a18b936ea907d0e34374f4eeaed18c5a + languageName: node + linkType: hard + +"mdast-util-to-hast@npm:^13.0.0": + version: 13.2.0 + resolution: "mdast-util-to-hast@npm:13.2.0" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@ungap/structured-clone": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + trim-lines: "npm:^3.0.0" + unist-util-position: "npm:^5.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + checksum: 10c0/9ee58def9287df8350cbb6f83ced90f9c088d72d4153780ad37854f87144cadc6f27b20347073b285173b1649b0723ddf0b9c78158608a804dcacb6bda6e1816 + languageName: node + linkType: hard + +"mdast-util-to-markdown@npm:^0.6.0, mdast-util-to-markdown@npm:^0.6.1, mdast-util-to-markdown@npm:~0.6.0": + version: 0.6.5 + resolution: "mdast-util-to-markdown@npm:0.6.5" + dependencies: + "@types/unist": "npm:^2.0.0" + longest-streak: "npm:^2.0.0" + mdast-util-to-string: "npm:^2.0.0" + parse-entities: "npm:^2.0.0" + repeat-string: "npm:^1.0.0" + zwitch: "npm:^1.0.0" + checksum: 10c0/716035b75a50394298eb31acee60a20d06310c7ebf83a3009908714d8c4058d636344932c9c054f1a26e8c6c20e2aafda3b87e003c16037b3e16b2d260a87463 + languageName: node + linkType: hard + +"mdast-util-to-string@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-to-string@npm:2.0.0" + checksum: 10c0/a4231085133cdfec24644b694c13661e5a01d26716be0105b6792889faa04b8030e4abbf72d4be3363098b2b38b2b98f1f1f1f0858eb6580dc04e2aca1436a37 + languageName: node + linkType: hard + +"mdurl@npm:^2.0.0": + version: 2.0.0 + resolution: "mdurl@npm:2.0.0" + checksum: 10c0/633db522272f75ce4788440669137c77540d74a83e9015666a9557a152c02e245b192edc20bc90ae953bbab727503994a53b236b4d9c99bdaee594d0e7dd2ce0 + languageName: node + linkType: hard + +"meow@npm:^9.0.0": + version: 9.0.0 + resolution: "meow@npm:9.0.0" + dependencies: + "@types/minimist": "npm:^1.2.0" + camelcase-keys: "npm:^6.2.2" + decamelize: "npm:^1.2.0" + decamelize-keys: "npm:^1.1.0" + hard-rejection: "npm:^2.1.0" + minimist-options: "npm:4.1.0" + normalize-package-data: "npm:^3.0.0" + read-pkg-up: "npm:^7.0.1" + redent: "npm:^3.0.0" + trim-newlines: "npm:^3.0.0" + type-fest: "npm:^0.18.0" + yargs-parser: "npm:^20.2.3" + checksum: 10c0/998955ecff999dc3f3867ef3b51999218212497f27d75b9cbe10bdb73aac4ee308d484f7801fd1b3cfa4172819065f65f076ca018c1412fab19d0ea486648722 + languageName: node + linkType: hard + +"merge-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-stream@npm:2.0.0" + checksum: 10c0/867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb + languageName: node + linkType: hard + +"micromark-extension-footnote@npm:^0.3.0": + version: 0.3.2 + resolution: "micromark-extension-footnote@npm:0.3.2" + dependencies: + micromark: "npm:~2.11.0" + checksum: 10c0/f3b931a514cc7b7b01a04c3bdfb2d77a41a92bbae5d12b2d04c3e72147027061eaa6a34b7e97c8432e064344be1ed5aff7dcbfdc678bc454ebb2bac95f531c09 + languageName: node + linkType: hard + +"micromark-extension-frontmatter@npm:^0.2.0": + version: 0.2.2 + resolution: "micromark-extension-frontmatter@npm:0.2.2" + dependencies: + fault: "npm:^1.0.0" + checksum: 10c0/1dbe3c222012e571b74d5a0b42e8fa0a3ccba5583ee5337d3f811e1747ebc6ac8abaa82bc3240fa71882c1671d3f1fd4dace8f1cef41c49af55215b839e6a1a1 + languageName: node + linkType: hard + +"micromark-extension-gfm-autolink-literal@npm:~0.5.0": + version: 0.5.7 + resolution: "micromark-extension-gfm-autolink-literal@npm:0.5.7" + dependencies: + micromark: "npm:~2.11.3" + checksum: 10c0/4e56021641200cd88a9e05be531405bba007db9187554e06d0dfb5d8c49df67991322f2f952d6a25bbe3972ef0543a08d7ea00dff7b8577f8f3ca196c6544114 + languageName: node + linkType: hard + +"micromark-extension-gfm-strikethrough@npm:~0.6.5": + version: 0.6.5 + resolution: "micromark-extension-gfm-strikethrough@npm:0.6.5" + dependencies: + micromark: "npm:~2.11.0" + checksum: 10c0/c14e953b833718f56a71a650e9c2958fdb2b91093d7304043443eb64a8287cb8ff776d3cec0d40ca00ccd69357438f3dcac2cc40d3f16e47230cfbce72a1cf51 + languageName: node + linkType: hard + +"micromark-extension-gfm-table@npm:~0.4.0": + version: 0.4.3 + resolution: "micromark-extension-gfm-table@npm:0.4.3" + dependencies: + micromark: "npm:~2.11.0" + checksum: 10c0/0f4be3a1206024845bbc2495ea3b2a255bf5287af3747733d398adf962bfcf6f0c452dc66e268ab84f41b64a2f8113028887034045450bad43a48a8b5583bc14 + languageName: node + linkType: hard + +"micromark-extension-gfm-tagfilter@npm:~0.3.0": + version: 0.3.0 + resolution: "micromark-extension-gfm-tagfilter@npm:0.3.0" + checksum: 10c0/5a81cffbcad7f314ddb3b761c5e2db5a5286e231e68559861da821ee748838cc9323fd22af5cbbe68569e826fa8159f2f2b0d53dc8aecc458ef48b2503a071fb + languageName: node + linkType: hard + +"micromark-extension-gfm-task-list-item@npm:~0.3.0": + version: 0.3.3 + resolution: "micromark-extension-gfm-task-list-item@npm:0.3.3" + dependencies: + micromark: "npm:~2.11.0" + checksum: 10c0/e94e02eb2509a6ced49a6b296a7c503068488da79b5d3a3e4dfe5dcd5abdb95a1f305c087abb4ca3f7c90112ae29d628b30edeadaf53d3eec9dfe338bb678650 + languageName: node + linkType: hard + +"micromark-extension-gfm@npm:^0.3.0": + version: 0.3.3 + resolution: "micromark-extension-gfm@npm:0.3.3" + dependencies: + micromark: "npm:~2.11.0" + micromark-extension-gfm-autolink-literal: "npm:~0.5.0" + micromark-extension-gfm-strikethrough: "npm:~0.6.5" + micromark-extension-gfm-table: "npm:~0.4.0" + micromark-extension-gfm-tagfilter: "npm:~0.3.0" + micromark-extension-gfm-task-list-item: "npm:~0.3.0" + checksum: 10c0/6ed94c6213687b84c7b2dbacf8a50b078c60fd960bc9ddb3ec742fc298b8f7d5dcd8e9ab2a73fb8b423a0b11bf0a1565bc24bf45b45009f2693690277a7675df + languageName: node + linkType: hard + +"micromark-util-character@npm:^2.0.0": + version: 2.1.1 + resolution: "micromark-util-character@npm:2.1.1" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10c0/d3fe7a5e2c4060fc2a076f9ce699c82a2e87190a3946e1e5eea77f563869b504961f5668d9c9c014724db28ac32fa909070ea8b30c3a39bd0483cc6c04cc76a1 languageName: node linkType: hard -"marked@npm:^4.0.10": - version: 4.0.14 - resolution: "marked@npm:4.0.14" - bin: - marked: bin/marked.js - checksum: 10c0/7b53312da1a47763985d842b9715f5184cbff993da2793cf4f0eadcf067243a3b4658df8d847726126f87b004c87f3359c60bbde7c15ca12f5bbc458defb3b7b +"micromark-util-encode@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-encode@npm:2.0.1" + checksum: 10c0/b2b29f901093845da8a1bf997ea8b7f5e061ffdba85070dfe14b0197c48fda64ffcf82bfe53c90cf9dc185e69eef8c5d41cae3ba918b96bc279326921b59008a languageName: node linkType: hard -"marked@npm:^4.3.0": - version: 4.3.0 - resolution: "marked@npm:4.3.0" - bin: - marked: bin/marked.js - checksum: 10c0/0013463855e31b9c88d8bb2891a611d10ef1dc79f2e3cbff1bf71ba389e04c5971298c886af0be799d7fa9aa4593b086a136062d59f1210b0480b026a8c5dc47 +"micromark-util-sanitize-uri@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-sanitize-uri@npm:2.0.1" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-encode: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + checksum: 10c0/60e92166e1870fd4f1961468c2651013ff760617342918e0e0c3c4e872433aa2e60c1e5a672bfe5d89dc98f742d6b33897585cf86ae002cda23e905a3c02527c languageName: node linkType: hard -"mdurl@npm:^2.0.0": - version: 2.0.0 - resolution: "mdurl@npm:2.0.0" - checksum: 10c0/633db522272f75ce4788440669137c77540d74a83e9015666a9557a152c02e245b192edc20bc90ae953bbab727503994a53b236b4d9c99bdaee594d0e7dd2ce0 +"micromark-util-symbol@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-symbol@npm:2.0.1" + checksum: 10c0/f2d1b207771e573232436618e78c5e46cd4b5c560dd4a6d63863d58018abbf49cb96ec69f7007471e51434c60de3c9268ef2bf46852f26ff4aacd10f9da16fe9 languageName: node linkType: hard -"merge-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "merge-stream@npm:2.0.0" - checksum: 10c0/867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 +"micromark-util-types@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-types@npm:2.0.1" + checksum: 10c0/872ec9334bb42afcc91c5bed8b7ee03b75654b36c6f221ab4d2b1bb0299279f00db948bf38ec6bc1ec03d0cf7842c21ab805190bf676157ba587eb0386d38b71 languageName: node linkType: hard -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb +"micromark@npm:^2.11.3, micromark@npm:~2.11.0, micromark@npm:~2.11.3": + version: 2.11.4 + resolution: "micromark@npm:2.11.4" + dependencies: + debug: "npm:^4.0.0" + parse-entities: "npm:^2.0.0" + checksum: 10c0/67307cbacae621ab1eb23e333a5addc7600cf97d3b40cad22fc1c2d03d734d6d9cbc3f5a7e5d655a8c0862a949abe590ab7cfa96be366bfe09e239a94e6eea55 languageName: node linkType: hard @@ -8388,6 +7850,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: 10c0/7e207bd5c20401b292de291f02913230cb1163abca162044f7db1d951fa245b174dc00869d40dd9a9f32a885ad6a5f3e767ee104cf278f399cb4e92d3f582d5c + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -8415,7 +7884,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -8424,17 +7893,21 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.3": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 +"minimist-options@npm:4.1.0": + version: 4.1.0 + resolution: "minimist-options@npm:4.1.0" + dependencies: + arrify: "npm:^1.0.1" + is-plain-obj: "npm:^1.1.0" + kind-of: "npm:^6.0.3" + checksum: 10c0/7871f9cdd15d1e7374e5b013e2ceda3d327a06a8c7b38ae16d9ef941e07d985e952c589e57213f7aa90a8744c60aed9524c0d85e501f5478382d9181f2763f54 languageName: node linkType: hard -"minimist@npm:^1.2.5": - version: 1.2.7 - resolution: "minimist@npm:1.2.7" - checksum: 10c0/8808da67ca50ee19ab2d69051d77ee78572e67297fd8a1635ecc757a15106ccdfb5b8c4d11d84750120142f1684e5329a141295728c755e5d149eedd73cc6572 +"minimist@npm:^1.2.3, minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 languageName: node linkType: hard @@ -8529,7 +8002,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": +"mkdirp@npm:^1.0.3": version: 1.0.4 resolution: "mkdirp@npm:1.0.4" bin: @@ -8609,13 +8082,6 @@ __metadata: languageName: node linkType: hard -"neo-async@npm:^2.6.2": - version: 2.6.2 - resolution: "neo-async@npm:2.6.2" - checksum: 10c0/c2f5a604a54a8ec5438a342e1f356dff4bc33ccccdb6dc668d94fe8e5eccfc9d2c2eea6064b0967a767ba63b33763f51ccf2cd2441b461a7322656c1f06b3f5d - languageName: node - linkType: hard - "netmask@npm:^2.0.2": version: 2.0.2 resolution: "netmask@npm:2.0.2" @@ -8703,13 +8169,6 @@ __metadata: languageName: node linkType: hard -"node-releases@npm:^2.0.14": - version: 2.0.14 - resolution: "node-releases@npm:2.0.14" - checksum: 10c0/199fc93773ae70ec9969bc6d5ac5b2bbd6eb986ed1907d751f411fef3ede0e4bfdb45ceb43711f8078bea237b6036db8b1bf208f6ff2b70c7d615afd157f3ab9 - languageName: node - linkType: hard - "node-releases@npm:^2.0.18": version: 2.0.18 resolution: "node-releases@npm:2.0.18" @@ -8735,7 +8194,31 @@ __metadata: languageName: node linkType: hard -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": +"normalize-package-data@npm:^2.5.0": + version: 2.5.0 + resolution: "normalize-package-data@npm:2.5.0" + dependencies: + hosted-git-info: "npm:^2.1.4" + resolve: "npm:^1.10.0" + semver: "npm:2 || 3 || 4 || 5" + validate-npm-package-license: "npm:^3.0.1" + checksum: 10c0/357cb1646deb42f8eb4c7d42c4edf0eec312f3628c2ef98501963cc4bbe7277021b2b1d977f982b2edce78f5a1014613ce9cf38085c3df2d76730481357ca504 + languageName: node + linkType: hard + +"normalize-package-data@npm:^3.0.0": + version: 3.0.3 + resolution: "normalize-package-data@npm:3.0.3" + dependencies: + hosted-git-info: "npm:^4.0.1" + is-core-module: "npm:^2.5.0" + semver: "npm:^7.3.4" + validate-npm-package-license: "npm:^3.0.1" + checksum: 10c0/e5d0f739ba2c465d41f77c9d950e291ea4af78f8816ddb91c5da62257c40b76d8c83278b0d08ffbcd0f187636ebddad20e181e924873916d03e6e5ea2ef026be + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 @@ -8765,6 +8248,13 @@ __metadata: languageName: node linkType: hard +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.13.3": + version: 1.13.3 + resolution: "object-inspect@npm:1.13.3" + checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 + languageName: node + linkType: hard + "object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -8772,14 +8262,7 @@ __metadata: languageName: node linkType: hard -"object-to-spawn-args@npm:^2.0.1": - version: 2.0.1 - resolution: "object-to-spawn-args@npm:2.0.1" - checksum: 10c0/1a997344d19b44cb5449fa92e5b12430b7719d22410367d0b54dbe2b604a4e813ce70d9b2bb9926dfc76c397f3db91e834d80d140877cd201b66e149fac0be98 - languageName: node - linkType: hard - -"object.assign@npm:^4.1.2": +"object.assign@npm:^4.1.2, object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -8820,6 +8303,17 @@ __metadata: languageName: node linkType: hard +"oniguruma-to-es@npm:0.4.1": + version: 0.4.1 + resolution: "oniguruma-to-es@npm:0.4.1" + dependencies: + emoji-regex-xs: "npm:^1.0.0" + regex: "npm:^5.0.0" + regex-recursion: "npm:^4.2.1" + checksum: 10c0/342ca92840f62be23252d9834ba07e85bf1a8d2962fef348d0fd0d49038776be338796662665ff602ee452215d01ab0cad92b4454cd7310e33a8c32c0e1d3dec + languageName: node + linkType: hard + "optionator@npm:^0.8.1": version: 0.8.3 resolution: "optionator@npm:0.8.3" @@ -8967,6 +8461,20 @@ __metadata: languageName: node linkType: hard +"parse-entities@npm:^2.0.0": + version: 2.0.0 + resolution: "parse-entities@npm:2.0.0" + dependencies: + character-entities: "npm:^1.0.0" + character-entities-legacy: "npm:^1.0.0" + character-reference-invalid: "npm:^1.0.0" + is-alphanumerical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + is-hexadecimal: "npm:^1.0.0" + checksum: 10c0/f85a22c0ea406ff26b53fdc28641f01cc36fa49eb2e3135f02693286c89ef0bcefc2262d99b3688e20aac2a14fd10b75c518583e875c1b9fe3d1f937795e0854 + languageName: node + linkType: hard + "parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -9072,20 +8580,13 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be languageName: node linkType: hard -"pify@npm:^4.0.1": - version: 4.0.1 - resolution: "pify@npm:4.0.1" - checksum: 10c0/6f9d404b0d47a965437403c9b90eca8bb2536407f03de165940e62e72c8c8b75adda5516c6b9b23675a5877cc0bcac6bdfb0ef0e39414cd2476d5495da40e7cf - languageName: node - linkType: hard - "pinst@npm:^3.0.0": version: 3.0.0 resolution: "pinst@npm:3.0.0" @@ -9111,6 +8612,13 @@ __metadata: languageName: node linkType: hard +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd + languageName: node + linkType: hard + "postcss-value-parser@npm:^4.2.0": version: 4.2.0 resolution: "postcss-value-parser@npm:4.2.0" @@ -9228,6 +8736,13 @@ __metadata: languageName: node linkType: hard +"property-information@npm:^6.0.0": + version: 6.5.0 + resolution: "property-information@npm:6.5.0" + checksum: 10c0/981e0f9cc2e5acdb414a6fd48a99dd0fd3a4079e7a91ab41cf97a8534cf43e0e0bc1ffada6602a1b3d047a33db8b5fc2ef46d863507eda712d5ceedac443f0ef + languageName: node + linkType: hard + "proxy-agent@npm:^6.4.0": version: 6.4.0 resolution: "proxy-agent@npm:6.4.0" @@ -9340,6 +8855,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^4.0.1": + version: 4.0.1 + resolution: "quick-lru@npm:4.0.1" + checksum: 10c0/f9b1596fa7595a35c2f9d913ac312fede13d37dc8a747a51557ab36e11ce113bbe88ef4c0154968845559a7709cb6a7e7cbe75f7972182451cd45e7f057a334d + languageName: node + linkType: hard + "react-error-overlay@npm:6.0.9": version: 6.0.9 resolution: "react-error-overlay@npm:6.0.9" @@ -9361,12 +8883,26 @@ __metadata: languageName: node linkType: hard -"readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: "npm:^4.1.0" + read-pkg: "npm:^5.2.0" + type-fest: "npm:^0.8.1" + checksum: 10c0/82b3ac9fd7c6ca1bdc1d7253eb1091a98ff3d195ee0a45386582ce3e69f90266163c34121e6a0a02f1630073a6c0585f7880b3865efcae9c452fa667f02ca385 + languageName: node + linkType: hard + +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" dependencies: - picomatch: "npm:^2.2.1" - checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b + "@types/normalize-package-data": "npm:^2.4.0" + normalize-package-data: "npm:^2.5.0" + parse-json: "npm:^5.0.0" + type-fest: "npm:^0.6.0" + checksum: 10c0/b51a17d4b51418e777029e3a7694c9bd6c578a5ab99db544764a0b0f2c7c0f58f8a6bc101f86a6fceb8ba6d237d67c89acf6170f6b98695d0420ddc86cf109fb languageName: node linkType: hard @@ -9379,115 +8915,118 @@ __metadata: languageName: node linkType: hard -"regenerate-unicode-properties@npm:^10.0.1": - version: 10.0.1 - resolution: "regenerate-unicode-properties@npm:10.0.1" +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" dependencies: - regenerate: "npm:^1.4.2" - checksum: 10c0/2ac39799588f81003b0b406611067c738ae63f876e8e66b1299b4d1c658ed435bf20007e08f45f1f49a7871510fc2d12cace283724cd4c6907a19adf6d5850a5 + indent-string: "npm:^4.0.0" + strip-indent: "npm:^3.0.0" + checksum: 10c0/d64a6b5c0b50eb3ddce3ab770f866658a2b9998c678f797919ceb1b586bab9259b311407280bd80b804e2a7c7539b19238ae6a2a20c843f1a7fcff21d48c2eae languageName: node linkType: hard -"regenerate-unicode-properties@npm:^10.2.0": - version: 10.2.0 - resolution: "regenerate-unicode-properties@npm:10.2.0" +"reflect.getprototypeof@npm:^1.0.6": + version: 1.0.7 + resolution: "reflect.getprototypeof@npm:1.0.7" dependencies: - regenerate: "npm:^1.4.2" - checksum: 10c0/5510785eeaf56bbfdf4e663d6753f125c08d2a372d4107bc1b756b7bf142e2ed80c2733a8b54e68fb309ba37690e66a0362699b0e21d5c1f0255dea1b00e6460 + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.5" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + gopd: "npm:^1.0.1" + which-builtin-type: "npm:^1.1.4" + checksum: 10c0/841814f7631b55ee42e198cb14a5c25c0752431ab8f0ad9794c32d46ab9fb0d5ba4939edac1f99a174a21443a1400a72bccbbb9ccd9277e4b4bf6d14aabb31c8 languageName: node linkType: hard -"regenerate@npm:^1.4.2": - version: 1.4.2 - resolution: "regenerate@npm:1.4.2" - checksum: 10c0/f73c9eba5d398c818edc71d1c6979eaa05af7a808682749dd079f8df2a6d91a9b913db216c2c9b03e0a8ba2bba8701244a93f45211afbff691c32c7b275db1b8 +"regenerator-runtime@npm:^0.14.1": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4 languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.4": - version: 0.13.9 - resolution: "regenerator-runtime@npm:0.13.9" - checksum: 10c0/b0f26612204f061a84064d2f3361629eae09993939112b9ffc3680bb369ecd125764d6654eace9ef11b36b44282ee52b988dda946ea52d372e7599a30eea73ee +"regex-recursion@npm:^4.2.1": + version: 4.2.1 + resolution: "regex-recursion@npm:4.2.1" + dependencies: + regex-utilities: "npm:^2.3.0" + checksum: 10c0/6dee0bccfe1e687da4a51a22526aa72c74ca4fcca55851428fe89b040e45d763933833652727e5074a1c704b7313d77304fe1cdba67382e2d97db62bbe701096 languageName: node linkType: hard -"regenerator-runtime@npm:^0.14.1": - version: 0.14.1 - resolution: "regenerator-runtime@npm:0.14.1" - checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4 +"regex-utilities@npm:^2.3.0": + version: 2.3.0 + resolution: "regex-utilities@npm:2.3.0" + checksum: 10c0/78c550a80a0af75223244fff006743922591bd8f61d91fef7c86b9b56cf9bbf8ee5d7adb6d8991b5e304c57c90103fc4818cf1e357b11c6c669b782839bd7893 languageName: node linkType: hard -"regenerator-transform@npm:^0.15.2": - version: 0.15.2 - resolution: "regenerator-transform@npm:0.15.2" +"regex@npm:^5.0.0": + version: 5.0.2 + resolution: "regex@npm:5.0.2" dependencies: - "@babel/runtime": "npm:^7.8.4" - checksum: 10c0/7cfe6931ec793269701994a93bab89c0cc95379191fad866270a7fea2adfec67ea62bb5b374db77058b60ba4509319d9b608664d0d288bd9989ca8dbd08fae90 + regex-utilities: "npm:^2.3.0" + checksum: 10c0/a9bc88a4b4cfb14a1c273312bb81c1bea5869648810bfb66353aa1ba6ce8bc8967559203eff3e20992c2696af41ed161872b9c49885503ea1c78f8433a9def81 languageName: node linkType: hard -"regexpu-core@npm:^5.1.0": - version: 5.1.0 - resolution: "regexpu-core@npm:5.1.0" +"regexp.prototype.flags@npm:^1.5.3": + version: 1.5.3 + resolution: "regexp.prototype.flags@npm:1.5.3" dependencies: - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.0.1" - regjsgen: "npm:^0.6.0" - regjsparser: "npm:^0.8.2" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.0.0" - checksum: 10c0/9a276c09bf672cae343148a91b7e58ddbc14ffd6f8e9643cc9a99b04ca8179304d56331149b880a1de75207e9df46f04efdb9ac62f92ecd3df0846fa9003e4ab + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-errors: "npm:^1.3.0" + set-function-name: "npm:^2.0.2" + checksum: 10c0/e1a7c7dc42cc91abf73e47a269c4b3a8f225321b7f617baa25821f6a123a91d23a73b5152f21872c566e699207e1135d075d2251cd3e84cc96d82a910adf6020 languageName: node linkType: hard -"regexpu-core@npm:^6.1.1": - version: 6.1.1 - resolution: "regexpu-core@npm:6.1.1" +"remark-footnotes@npm:^3.0.0": + version: 3.0.0 + resolution: "remark-footnotes@npm:3.0.0" dependencies: - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.2.0" - regjsgen: "npm:^0.8.0" - regjsparser: "npm:^0.11.0" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.1.0" - checksum: 10c0/07d49697e20f9b65977535abba4858b7f5171c13f7c366be53ec1886d3d5f69f1b98cc6a6e63cf271adda077c3366a4c851c7473c28bbd69cf5a6b6b008efc3e + mdast-util-footnote: "npm:^0.1.0" + micromark-extension-footnote: "npm:^0.3.0" + checksum: 10c0/bfe3645be44d857d697705ac4906ce8f521429482122cab1cb507f3486c3386ecce791599d6f9d886bc567e6d3ba716caa2435d40f35b6775d92a2dd32f0ef20 languageName: node linkType: hard -"regjsgen@npm:^0.6.0": - version: 0.6.0 - resolution: "regjsgen@npm:0.6.0" - checksum: 10c0/e06ef822a4ab9a2faddbdc7f58c294939f9a22c02ca56b404f07f1f9c6bd51dc345ab8b5e2d3267f274a1f77ba4c56d9741e1c53b494bf12da6842c70fe35edc +"remark-frontmatter@npm:^3.0.0": + version: 3.0.0 + resolution: "remark-frontmatter@npm:3.0.0" + dependencies: + mdast-util-frontmatter: "npm:^0.2.0" + micromark-extension-frontmatter: "npm:^0.2.0" + checksum: 10c0/19aabb28b5dbc84fea764238324821315147ce5612283932e11a69e65b98f79ea87d88de16d7b20196281846e324b54331507ba6021a1ce32ff8a43a28dcc44b languageName: node linkType: hard -"regjsgen@npm:^0.8.0": - version: 0.8.0 - resolution: "regjsgen@npm:0.8.0" - checksum: 10c0/44f526c4fdbf0b29286101a282189e4dbb303f4013cf3fea058668d96d113b9180d3d03d1e13f6d4cbde38b7728bf951aecd9dc199938c080093a9a6f0d7a6bd +"remark-gfm@npm:^1.0.0": + version: 1.0.0 + resolution: "remark-gfm@npm:1.0.0" + dependencies: + mdast-util-gfm: "npm:^0.1.0" + micromark-extension-gfm: "npm:^0.3.0" + checksum: 10c0/929a2328b1a0c63c38cc1678a41089f75f594fb928c02bfcfe967702377ede245fec0ed45a258fe0af421dda547439911260b8621b2ea6819eaa5f6b47d2bb4c languageName: node linkType: hard -"regjsparser@npm:^0.11.0": - version: 0.11.1 - resolution: "regjsparser@npm:0.11.1" +"remark-parse@npm:^9.0.0": + version: 9.0.0 + resolution: "remark-parse@npm:9.0.0" dependencies: - jsesc: "npm:~3.0.2" - bin: - regjsparser: bin/parser - checksum: 10c0/be4b40981a596b31eacd84ee12cfa474f1d33a6c05f7e995e8ec9d5ad8f1c3fbf7a5b690a05c443e1f312a1c0b16d4ea0b3384596a61d4fda97aa322879bb3cd + mdast-util-from-markdown: "npm:^0.8.0" + checksum: 10c0/7523b2a2e3c7a80f7530b4d5615e8862890abe321cdc4f6f7b103c70ceb4b3eca14cc71127149f05d5e29ed521b0c7505af9f11b1293921cf7cdf6d794104a21 languageName: node linkType: hard -"regjsparser@npm:^0.8.2": - version: 0.8.4 - resolution: "regjsparser@npm:0.8.4" - dependencies: - jsesc: "npm:~0.5.0" - bin: - regjsparser: bin/parser - checksum: 10c0/d7658e0b59f16f55f2a50d8d2f731165e85d7b22b7c7a08e70b080b0e49b893b0e282caff4b00b35336aaa66851a2faa1b0cb53094e71da1dcefd837a3b202ec +"repeat-string@npm:^1.0.0": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 10c0/87fa21bfdb2fbdedc44b9a5b118b7c1239bdd2c2c1e42742ef9119b7d412a5137a1d23f1a83dc6bb686f4f27429ac6f542e3d923090b44181bafa41e8ac0174d languageName: node linkType: hard @@ -9505,15 +9044,6 @@ __metadata: languageName: node linkType: hard -"requizzle@npm:^0.2.3": - version: 0.2.3 - resolution: "requizzle@npm:0.2.3" - dependencies: - lodash: "npm:^4.17.14" - checksum: 10c0/afb3d4efba9e49d1c168db1cd73ad0be51784dc42bca84c022693d18d55d998323545d02197236e4d23da6e1e82b98729c4db9bfcfebd061f9e44f61e46b072f - languageName: node - linkType: hard - "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -9551,7 +9081,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6": +"resolve@npm:^1.1.6, resolve@npm:^1.10.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -9564,7 +9094,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.14.2, resolve@npm:^1.20.0": +"resolve@npm:^1.20.0": version: 1.22.3 resolution: "resolve@npm:1.22.3" dependencies: @@ -9577,7 +9107,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -9590,7 +9120,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin": +"resolve@patch:resolve@npm%3A^1.20.0#optional!builtin": version: 1.22.3 resolution: "resolve@patch:resolve@npm%3A1.22.3#optional!builtin::version=1.22.3&hash=c3c19d" dependencies: @@ -9637,6 +9167,18 @@ __metadata: languageName: node linkType: hard +"safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" + dependencies: + call-bind: "npm:^1.0.7" + get-intrinsic: "npm:^1.2.4" + has-symbols: "npm:^1.0.3" + isarray: "npm:^2.0.5" + checksum: 10c0/12f9fdb01c8585e199a347eacc3bae7b5164ae805cdc8c6707199dbad5b9e30001a50a43c4ee24dc9ea32dbb7279397850e9208a7e217f4d8b1cf5d90129dec9 + languageName: node + linkType: hard + "safe-buffer@npm:^5.0.1": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -9651,6 +9193,17 @@ __metadata: languageName: node linkType: hard +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-regex: "npm:^1.1.4" + checksum: 10c0/900bf7c98dc58f08d8523b7012b468e4eb757afa624f198902c0643d7008ba777b0bdc35810ba0b758671ce887617295fb742b3f3968991b178ceca54cb07603 + languageName: node + linkType: hard + "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -9667,16 +9220,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.3, semver@npm:^7.6.0, semver@npm:^7.6.3": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"semver@npm:^5.6.0": +"semver@npm:2 || 3 || 4 || 5": version: 5.7.2 resolution: "semver@npm:5.7.2" bin: @@ -9685,6 +9229,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:7.6.3, semver@npm:^7.3.4, semver@npm:^7.6.0, semver@npm:^7.6.3": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf + languageName: node + linkType: hard + "semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" @@ -9728,6 +9281,18 @@ __metadata: languageName: node linkType: hard +"set-function-name@npm:^2.0.2": + version: 2.0.2 + resolution: "set-function-name@npm:2.0.2" + dependencies: + define-data-property: "npm:^1.1.4" + es-errors: "npm:^1.3.0" + functions-have-names: "npm:^1.2.3" + has-property-descriptors: "npm:^1.0.2" + checksum: 10c0/fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -9757,6 +9322,20 @@ __metadata: languageName: node linkType: hard +"shiki@npm:^1.16.2": + version: 1.23.1 + resolution: "shiki@npm:1.23.1" + dependencies: + "@shikijs/core": "npm:1.23.1" + "@shikijs/engine-javascript": "npm:1.23.1" + "@shikijs/engine-oniguruma": "npm:1.23.1" + "@shikijs/types": "npm:1.23.1" + "@shikijs/vscode-textmate": "npm:^9.3.0" + "@types/hast": "npm:^3.0.4" + checksum: 10c0/7c2bcc800fb986a1856a9859c694194d22449bc0a7f964e1fad8a713246257a58606b0a0e35d25b07a51f52d51737f1415d882090e74a94672ebb6d9bbe2cf88 + languageName: node + linkType: hard + "shx@npm:^0.3.4": version: 0.3.4 resolution: "shx@npm:0.3.4" @@ -9769,6 +9348,18 @@ __metadata: languageName: node linkType: hard +"side-channel@npm:^1.0.4": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + object-inspect: "npm:^1.13.1" + checksum: 10c0/d2afd163dc733cc0a39aa6f7e39bf0c436293510dbccbff446733daeaf295857dbccf94297092ec8c53e2503acac30f0b78830876f0485991d62a90e9cad305f + languageName: node + linkType: hard + "signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -9790,13 +9381,6 @@ __metadata: languageName: node linkType: hard -"slash@npm:^2.0.0": - version: 2.0.0 - resolution: "slash@npm:2.0.0" - checksum: 10c0/f83dbd3cb62c41bb8fcbbc6bf5473f3234b97fa1d008f571710a9d3757a28c7169e1811cad1554ccb1cc531460b3d221c9a7b37f549398d9a30707f0a5af9193 - languageName: node - linkType: hard - "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -9843,21 +9427,6 @@ __metadata: languageName: node linkType: hard -"sort-array@npm:^5.0.0": - version: 5.0.0 - resolution: "sort-array@npm:5.0.0" - dependencies: - array-back: "npm:^6.2.2" - typical: "npm:^7.1.1" - peerDependencies: - "@75lb/nature": ^0.1.1 - peerDependenciesMeta: - "@75lb/nature": - optional: true - checksum: 10c0/b6d19c63b5f00f7637e0c991de7aa07bdf314348ce22ba760524d8bf309cab7c22950b2f6014e652f4fa6a04faef7e1288e0f1fca82252f5094c7b8ecfd904f8 - languageName: node - linkType: hard - "source-map-generator@npm:0.8.0": version: 0.8.0 resolution: "source-map-generator@npm:0.8.0" @@ -9889,6 +9458,47 @@ __metadata: languageName: node linkType: hard +"space-separated-tokens@npm:^2.0.0": + version: 2.0.2 + resolution: "space-separated-tokens@npm:2.0.2" + checksum: 10c0/6173e1d903dca41dcab6a2deed8b4caf61bd13b6d7af8374713500570aa929ff9414ae09a0519f4f8772df993300305a395d4871f35bc4ca72b6db57e1f30af8 + languageName: node + linkType: hard + +"spdx-correct@npm:^3.0.0": + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" + dependencies: + spdx-expression-parse: "npm:^3.0.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10c0/49208f008618b9119208b0dadc9208a3a55053f4fd6a0ae8116861bd22696fc50f4142a35ebfdb389e05ccf2de8ad142573fefc9e26f670522d899f7b2fe7386 + languageName: node + linkType: hard + +"spdx-exceptions@npm:^2.1.0": + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10c0/37217b7762ee0ea0d8b7d0c29fd48b7e4dfb94096b109d6255b589c561f57da93bf4e328c0290046115961b9209a8051ad9f525e48d433082fc79f496a4ea940 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" + dependencies: + spdx-exceptions: "npm:^2.1.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10c0/6f8a41c87759fa184a58713b86c6a8b028250f158159f1d03ed9d1b6ee4d9eefdc74181c8ddc581a341aa971c3e7b79e30b59c23b05d2436d5de1c30bdef7171 + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.20 + resolution: "spdx-license-ids@npm:3.0.20" + checksum: 10c0/bdff7534fad6ef59be49becda1edc3fb7f5b3d6f296a715516ab9d972b8ad59af2c34b2003e01db8970d4c673d185ff696ba74c6b61d3bf327e2b3eac22c297c + languageName: node + linkType: hard + "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" @@ -9953,25 +9563,69 @@ __metadata: languageName: node linkType: hard -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca + languageName: node + linkType: hard + +"string.prototype.trim@npm:^1.2.9": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.0" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/dcef1a0fb61d255778155006b372dff8cc6c4394bc39869117e4241f41a2c52899c0d263ffc7738a1f9e61488c490b05c0427faa15151efad721e1a9fb2663c2 + languageName: node + linkType: hard + +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/0a0b54c17c070551b38e756ae271865ac6cc5f60dabf2e7e343cceae7d9b02e1a1120a824e090e79da1b041a74464e8477e2da43e2775c85392be30a6f60963c + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 languageName: node linkType: hard -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" +"stringify-entities@npm:^4.0.0": + version: 4.0.4 + resolution: "stringify-entities@npm:4.0.4" dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca + character-entities-html4: "npm:^2.0.0" + character-entities-legacy: "npm:^3.0.0" + checksum: 10c0/537c7e656354192406bdd08157d759cd615724e9d0873602d2c9b2f6a5c0a8d0b1d73a0a08677848105c5eebac6db037b57c0b3a4ec86331117fa7319ed50448 languageName: node linkType: hard @@ -10007,7 +9661,16 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: "npm:^1.0.0" + checksum: 10c0/ae0deaf41c8d1001c5d4fbe16cb553865c1863da4fae036683b474fa926af9fc121e155cb3fc57a68262b2ae7d5b8420aa752c97a6428c315d00efe2a3875679 + languageName: node + linkType: hard + +"strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd @@ -10065,16 +9728,6 @@ __metadata: languageName: node linkType: hard -"table-layout@npm:^4.1.0": - version: 4.1.1 - resolution: "table-layout@npm:4.1.1" - dependencies: - array-back: "npm:^6.2.2" - wordwrapjs: "npm:^5.1.0" - checksum: 10c0/26d8e54a55ddb4de447c8f02a8d7fcbb66a9580375e406a3bc7717ab223a413f6dfbded6710f288b3dfd277991813a0bd5a17419a0dc6db54d9a36d883d868dc - languageName: node - linkType: hard - "tar-fs@npm:^3.0.6": version: 3.0.6 resolution: "tar-fs@npm:3.0.6" @@ -10233,6 +9886,45 @@ __metadata: languageName: node linkType: hard +"transform-markdown-links@npm:^2.0.0": + version: 2.1.0 + resolution: "transform-markdown-links@npm:2.1.0" + checksum: 10c0/f46c894fbcb975cc8e365af135865765f60714a19ae2626826fb2237a3a380f91cf9d78d531d3028270a153d999c137de47f845fcb92a8853887c556668b34c6 + languageName: node + linkType: hard + +"traverse@npm:^0.6.7": + version: 0.6.10 + resolution: "traverse@npm:0.6.10" + dependencies: + gopd: "npm:^1.0.1" + typedarray.prototype.slice: "npm:^1.0.3" + which-typed-array: "npm:^1.1.15" + checksum: 10c0/d37619cd650dda26fc9f8c3c55087098e702abc1a91e57a5701644f3aee67a5c61daf47ca883ebe6777ea810424317bd142b8e90ee0d9dc9171bd19df6cf6fd8 + languageName: node + linkType: hard + +"trim-lines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-lines@npm:3.0.1" + checksum: 10c0/3a1611fa9e52aa56a94c69951a9ea15b8aaad760eaa26c56a65330dc8adf99cb282fc07cc9d94968b7d4d88003beba220a7278bbe2063328eb23fb56f9509e94 + languageName: node + linkType: hard + +"trim-newlines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-newlines@npm:3.0.1" + checksum: 10c0/03cfefde6c59ff57138412b8c6be922ecc5aec30694d784f2a65ef8dcbd47faef580b7de0c949345abdc56ec4b4abf64dd1e5aea619b200316e471a3dd5bf1f6 + languageName: node + linkType: hard + +"trough@npm:^1.0.0": + version: 1.0.5 + resolution: "trough@npm:1.0.5" + checksum: 10c0/f036d0d7f9bc7cfe5ee650d70b57bb1f048f3292adf6c81bb9b228e546b2b2e5b74ea04a060d21472108a8cda05ec4814bbe86f87ee35c182c50cb41b5c1810a + languageName: node + linkType: hard + "ts-api-utils@npm:^1.3.0": version: 1.3.0 resolution: "ts-api-utils@npm:1.3.0" @@ -10392,6 +10084,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.18.0": + version: 0.18.1 + resolution: "type-fest@npm:0.18.1" + checksum: 10c0/303f5ecf40d03e1d5b635ce7660de3b33c18ed8ebc65d64920c02974d9e684c72483c23f9084587e9dd6466a2ece1da42ddc95b412a461794dd30baca95e2bac + languageName: node + linkType: hard + "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2" @@ -10406,6 +10105,73 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: 10c0/0c585c26416fce9ecb5691873a1301b5aff54673c7999b6f925691ed01f5b9232db408cdbb0bd003d19f5ae284322523f44092d1f81ca0a48f11f7cf0be8cd38 + languageName: node + linkType: hard + +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10c0/dffbb99329da2aa840f506d376c863bd55f5636f4741ad6e65e82f5ce47e6914108f44f340a0b74009b0cb5d09d6752ae83203e53e98b1192cf80ecee5651636 + languageName: node + linkType: hard + +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + is-typed-array: "npm:^1.1.13" + checksum: 10c0/9e043eb38e1b4df4ddf9dde1aa64919ae8bb909571c1cc4490ba777d55d23a0c74c7d73afcdd29ec98616d91bb3ae0f705fad4421ea147e1daf9528200b562da + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + checksum: 10c0/fcebeffb2436c9f355e91bd19e2368273b88c11d1acc0948a2a306792f1ab672bce4cfe524ab9f51a0505c9d7cd1c98eff4235c4f6bfef6a198f6cfc4ff3d4f3 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.3 + resolution: "typed-array-byte-offset@npm:1.0.3" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + reflect.getprototypeof: "npm:^1.0.6" + checksum: 10c0/5da29585f96671c0521475226d3227000b3e01d1e99208b66bb05b75c7c8f4d0e9cc2e79920f3bfbc792a00102df1daa2608a2753e3f291b671d5a80245bde5b + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.6": + version: 1.0.7 + resolution: "typed-array-length@npm:1.0.7" + dependencies: + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + is-typed-array: "npm:^1.1.13" + possible-typed-array-names: "npm:^1.0.0" + reflect.getprototypeof: "npm:^1.0.6" + checksum: 10c0/e38f2ae3779584c138a2d8adfa8ecf749f494af3cd3cdafe4e688ce51418c7d2c5c88df1bd6be2bbea099c3f7cea58c02ca02ed438119e91f162a9de23f61295 + languageName: node + linkType: hard + "typed-query-selector@npm:^2.12.0": version: 2.12.0 resolution: "typed-query-selector@npm:2.12.0" @@ -10422,6 +10188,46 @@ __metadata: languageName: node linkType: hard +"typedarray.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "typedarray.prototype.slice@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.0" + es-errors: "npm:^1.3.0" + typed-array-buffer: "npm:^1.0.2" + typed-array-byte-offset: "npm:^1.0.2" + checksum: 10c0/6ac110a8b58a1ccb086242f09d1ce9c7ba2885924e816364a7879083b983d4096f19aab6f9aa8c0ce5ddd3d8ae3f3ba5581e10fa6838880f296a0c54c26f424b + languageName: node + linkType: hard + +"typedoc-plugin-markdown@npm:^4.2.10": + version: 4.2.10 + resolution: "typedoc-plugin-markdown@npm:4.2.10" + peerDependencies: + typedoc: 0.26.x + checksum: 10c0/5771602a2d673824e1a01841f81eb0fe45fe2d6b61070c278903e2c14e5aab4eafd7c37831b7297aaef27185b4eb2b638111add22fc2a0e26b6165b3c54d0bd1 + languageName: node + linkType: hard + +"typedoc@npm:^0.26.11": + version: 0.26.11 + resolution: "typedoc@npm:0.26.11" + dependencies: + lunr: "npm:^2.3.9" + markdown-it: "npm:^14.1.0" + minimatch: "npm:^9.0.5" + shiki: "npm:^1.16.2" + yaml: "npm:^2.5.1" + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x + bin: + typedoc: bin/typedoc + checksum: 10c0/441104f1215af8d7589375691afc993bea1fab7c9b7b91ead22781e994f9f21a7a779a283dc42d72260171164185fad7dbcf61166b0442107d9c7decb84b2aee + languageName: node + linkType: hard + "typescript-eslint@npm:^8.6.0": version: 8.14.0 resolution: "typescript-eslint@npm:8.14.0" @@ -10456,13 +10262,6 @@ __metadata: languageName: node linkType: hard -"typical@npm:^7.1.1, typical@npm:^7.2.0": - version: 7.2.0 - resolution: "typical@npm:7.2.0" - checksum: 10c0/aa447e761808c9447c3abde370f2bdd2edd031ff68183aac49ac503905155e66a9f47e1462ac6fa411f76b22920c4d403f948f49d984ebf52d019fa590034963 - languageName: node - linkType: hard - "uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0": version: 2.1.0 resolution: "uc.micro@npm:2.1.0" @@ -10470,12 +10269,15 @@ __metadata: languageName: node linkType: hard -"uglify-js@npm:^3.1.4": - version: 3.15.4 - resolution: "uglify-js@npm:3.15.4" - bin: - uglifyjs: bin/uglifyjs - checksum: 10c0/0995c629d2e7ea5c70f249a7135c3fa069d297d35a8f5a8f009147fd9b9357a632f1daac682ec75c0929cd2e805bb42eb9ff69fd8b59da345003190634f40a42 +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + has-bigints: "npm:^1.0.2" + has-symbols: "npm:^1.0.3" + which-boxed-primitive: "npm:^1.0.2" + checksum: 10c0/81ca2e81134167cc8f75fa79fbcc8a94379d6c61de67090986a2273850989dd3bae8440c163121b77434b68263e34787a675cbdcb34bb2f764c6b9c843a11b66 languageName: node linkType: hard @@ -10489,10 +10291,10 @@ __metadata: languageName: node linkType: hard -"underscore@npm:~1.13.2": - version: 1.13.2 - resolution: "underscore@npm:1.13.2" - checksum: 10c0/cfdbdfceaa927452244ea22027093bd5a7c4daa90c5bcc88ffcd1312424091bc1f0238d2c5dbd6693c4d255481d4c07a33ab70dd02c7eb65b9ae0ae7c2dfcfe8 +"underscore@npm:^1.13.2": + version: 1.13.7 + resolution: "underscore@npm:1.13.7" + checksum: 10c0/fad2b4aac48847674aaf3c30558f383399d4fdafad6dd02dd60e4e1b8103b52c5a9e5937e0cc05dacfd26d6a0132ed0410ab4258241240757e4a4424507471cd languageName: node linkType: hard @@ -10503,59 +10305,109 @@ __metadata: languageName: node linkType: hard -"unicode-canonical-property-names-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.0" - checksum: 10c0/0fe812641bcfa3ae433025178a64afb5d9afebc21a922dafa7cba971deebb5e4a37350423890750132a85c936c290fb988146d0b1bd86838ad4897f4fc5bd0de +"unified@npm:^9.2.2": + version: 9.2.2 + resolution: "unified@npm:9.2.2" + dependencies: + bail: "npm:^1.0.0" + extend: "npm:^3.0.0" + is-buffer: "npm:^2.0.0" + is-plain-obj: "npm:^2.0.0" + trough: "npm:^1.0.0" + vfile: "npm:^4.0.0" + checksum: 10c0/a66d71b039c24626802a4664a1f3210f29ab1f75b89fd41933e6ab00561e1ec43a5bec6de32c7ebc86544e5f00ef5836e8fe79a823e81e35825de4e35823eda9 languageName: node linkType: hard -"unicode-match-property-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-ecmascript@npm:2.0.0" +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" dependencies: - unicode-canonical-property-names-ecmascript: "npm:^2.0.0" - unicode-property-aliases-ecmascript: "npm:^2.0.0" - checksum: 10c0/4d05252cecaf5c8e36d78dc5332e03b334c6242faf7cf16b3658525441386c0a03b5f603d42cbec0f09bb63b9fd25c9b3b09667aee75463cac3efadae2cd17ec + imurmurhash: "npm:^0.1.4" + checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.0.0" - checksum: 10c0/01de52b5ab875a695e0ff7b87671197e39dcca497ef3c11f1c04d958933352a91d56c280e3908a76a1a0468d37d0227e5450a7956073591ce157d52603b45953 +"unist-util-is@npm:^4.0.0": + version: 4.1.0 + resolution: "unist-util-is@npm:4.1.0" + checksum: 10c0/21ca3d7bacc88853b880b19cb1b133a056c501617d7f9b8cce969cd8b430ed7e1bc416a3a11b02540d5de6fb86807e169d00596108a459d034cf5faec97c055e languageName: node linkType: hard -"unicode-match-property-value-ecmascript@npm:^2.1.0": - version: 2.1.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.1.0" - checksum: 10c0/f5b9499b9e0ffdc6027b744d528f17ec27dd7c15da03254ed06851feec47e0531f20d410910c8a49af4a6a190f4978413794c8d75ce112950b56d583b5d5c7f2 +"unist-util-is@npm:^6.0.0": + version: 6.0.0 + resolution: "unist-util-is@npm:6.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10c0/9419352181eaa1da35eca9490634a6df70d2217815bb5938a04af3a662c12c5607a2f1014197ec9c426fbef18834f6371bfdb6f033040fa8aa3e965300d70e7e languageName: node linkType: hard -"unicode-property-aliases-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-property-aliases-ecmascript@npm:2.0.0" - checksum: 10c0/db7f7ae188ce1a59b133a2c97021aebe30acc18a55f41074d126dcce5ac9d789dbd3ce7947e391b23db27f969251037b6ae05871d036aaa6cc0a6510c429aa1c +"unist-util-position@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-position@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10c0/dde3b31e314c98f12b4dc6402f9722b2bf35e96a4f2d463233dd90d7cde2d4928074a7a11eff0a5eb1f4e200f27fc1557e0a64a7e8e4da6558542f251b1b7400 languageName: node linkType: hard -"unique-filename@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-filename@npm:3.0.0" +"unist-util-stringify-position@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-util-stringify-position@npm:2.0.3" dependencies: - unique-slug: "npm:^4.0.0" - checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f + "@types/unist": "npm:^2.0.2" + checksum: 10c0/46fa03f840df173b7f032cbfffdb502fb05b79b3fb5451681c796cf4985d9087a537833f5afb75d55e79b46bbbe4b3d81dd75a1062f9289091c526aebe201d5d languageName: node linkType: hard -"unique-slug@npm:^4.0.0": +"unist-util-stringify-position@npm:^4.0.0": version: 4.0.0 - resolution: "unique-slug@npm:4.0.0" + resolution: "unist-util-stringify-position@npm:4.0.0" dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 + "@types/unist": "npm:^3.0.0" + checksum: 10c0/dfe1dbe79ba31f589108cb35e523f14029b6675d741a79dea7e5f3d098785045d556d5650ec6a8338af11e9e78d2a30df12b1ee86529cded1098da3f17ee999e + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^3.0.0": + version: 3.1.1 + resolution: "unist-util-visit-parents@npm:3.1.1" + dependencies: + "@types/unist": "npm:^2.0.0" + unist-util-is: "npm:^4.0.0" + checksum: 10c0/231c80c5ba8e79263956fcaa25ed2a11ad7fe77ac5ba0d322e9d51bbc4238501e3bb52f405e518bcdc5471e27b33eff520db0aa4a3b1feb9fb6e2de6ae385d49 + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^6.0.0": + version: 6.0.1 + resolution: "unist-util-visit-parents@npm:6.0.1" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10c0/51b1a5b0aa23c97d3e03e7288f0cdf136974df2217d0999d3de573c05001ef04cccd246f51d2ebdfb9e8b0ed2704451ad90ba85ae3f3177cf9772cef67f56206 + languageName: node + linkType: hard + +"unist-util-visit@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-visit@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + unist-util-visit-parents: "npm:^6.0.0" + checksum: 10c0/51434a1d80252c1540cce6271a90fd1a106dbe624997c09ed8879279667fb0b2d3a685e02e92bf66598dcbe6cdffa7a5f5fb363af8fdf90dda6c855449ae39a5 languageName: node linkType: hard @@ -10573,20 +10425,6 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.13": - version: 1.0.13 - resolution: "update-browserslist-db@npm:1.0.13" - dependencies: - escalade: "npm:^3.1.1" - picocolors: "npm:^1.0.0" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10c0/e52b8b521c78ce1e0c775f356cd16a9c22c70d25f3e01180839c407a5dc787fb05a13f67560cbaf316770d26fa99f78f1acd711b1b54a4f35d4820d4ea7136e6 - languageName: node - linkType: hard - "update-browserslist-db@npm:^1.1.0": version: 1.1.0 resolution: "update-browserslist-db@npm:1.1.0" @@ -10601,6 +10439,13 @@ __metadata: languageName: node linkType: hard +"update-section@npm:^0.3.3": + version: 0.3.3 + resolution: "update-section@npm:0.3.3" + checksum: 10c0/1341622eca3ea617750ee1245bb796c0fdc32e4fef4b279a5658b0c61b98aa28e30d6943f9c787d6a409c096ff02e4949a0e04d2d62deab363551ecc4500c11a + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -10652,6 +10497,58 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-license@npm:^3.0.1": + version: 3.0.4 + resolution: "validate-npm-package-license@npm:3.0.4" + dependencies: + spdx-correct: "npm:^3.0.0" + spdx-expression-parse: "npm:^3.0.0" + checksum: 10c0/7b91e455a8de9a0beaa9fe961e536b677da7f48c9a493edf4d4d4a87fd80a7a10267d438723364e432c2fcd00b5650b5378275cded362383ef570276e6312f4f + languageName: node + linkType: hard + +"vfile-message@npm:^2.0.0": + version: 2.0.4 + resolution: "vfile-message@npm:2.0.4" + dependencies: + "@types/unist": "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + checksum: 10c0/ce50d90e0e5dc8f995f39602dd2404f1756388a54209c983d259b17c15e6f262a53546977a638065bc487d0657799fa96f4c1ba6b2915d9724a4968e9c7ff1c8 + languageName: node + linkType: hard + +"vfile-message@npm:^4.0.0": + version: 4.0.2 + resolution: "vfile-message@npm:4.0.2" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-stringify-position: "npm:^4.0.0" + checksum: 10c0/07671d239a075f888b78f318bc1d54de02799db4e9dce322474e67c35d75ac4a5ac0aaf37b18801d91c9f8152974ea39678aa72d7198758b07f3ba04fb7d7514 + languageName: node + linkType: hard + +"vfile@npm:^4.0.0": + version: 4.2.1 + resolution: "vfile@npm:4.2.1" + dependencies: + "@types/unist": "npm:^2.0.0" + is-buffer: "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + vfile-message: "npm:^2.0.0" + checksum: 10c0/4816aecfedc794ba4d3131abff2032ef0e825632cfa8cd20dd9d83819ef260589924f4f3e8fa30e06da2d8e60d7ec8ef7d0af93e0483df62890738258daf098a + languageName: node + linkType: hard + +"vfile@npm:^6.0.0": + version: 6.0.3 + resolution: "vfile@npm:6.0.3" + dependencies: + "@types/unist": "npm:^3.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10c0/e5d9eb4810623f23758cfc2205323e33552fb5972e5c2e6587babe08fe4d24859866277404fb9e2a20afb71013860d96ec806cb257536ae463c87d70022ab9ef + languageName: node + linkType: hard + "w3c-hr-time@npm:^1.0.2": version: 1.0.2 resolution: "w3c-hr-time@npm:1.0.2" @@ -10670,20 +10567,6 @@ __metadata: languageName: node linkType: hard -"walk-back@npm:^2.0.1": - version: 2.0.1 - resolution: "walk-back@npm:2.0.1" - checksum: 10c0/2dbd1de7a792fcca9ee6205022f4dcdc463a13c1e510d833d5872c292b7ce5ed02e9c10e9a1c0afd3c6ba8e338df5a55598f08e8cbdec326a804d825460a11c8 - languageName: node - linkType: hard - -"walk-back@npm:^5.1.1": - version: 5.1.1 - resolution: "walk-back@npm:5.1.1" - checksum: 10c0/e2b7b2d146c8b0f144acb30d9908734bacda8f73feead40a30adb386fea3d26dd9cb78fdb137c5f66a4fce88ee62b3b62af48877cbeaeaefd8d9dbea350e4d68 - languageName: node - linkType: hard - "walker@npm:^1.0.7": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -10741,6 +10624,65 @@ __metadata: languageName: node linkType: hard +"which-boxed-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "which-boxed-primitive@npm:1.0.2" + dependencies: + is-bigint: "npm:^1.0.1" + is-boolean-object: "npm:^1.1.0" + is-number-object: "npm:^1.0.4" + is-string: "npm:^1.0.5" + is-symbol: "npm:^1.0.3" + checksum: 10c0/0a62a03c00c91dd4fb1035b2f0733c341d805753b027eebd3a304b9cb70e8ce33e25317add2fe9b5fea6f53a175c0633ae701ff812e604410ddd049777cd435e + languageName: node + linkType: hard + +"which-builtin-type@npm:^1.1.4": + version: 1.2.0 + resolution: "which-builtin-type@npm:1.2.0" + dependencies: + call-bind: "npm:^1.0.7" + function.prototype.name: "npm:^1.1.6" + has-tostringtag: "npm:^1.0.2" + is-async-function: "npm:^2.0.0" + is-date-object: "npm:^1.0.5" + is-finalizationregistry: "npm:^1.1.0" + is-generator-function: "npm:^1.0.10" + is-regex: "npm:^1.1.4" + is-weakref: "npm:^1.0.2" + isarray: "npm:^2.0.5" + which-boxed-primitive: "npm:^1.0.2" + which-collection: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10c0/7cd4a8ccfa6a3cb7c2296c716e7266b9f31a66f3e131fe7b185232c16d3ad21442046ec1798c4ec1e19dce7eb99c7751377192e5e734dc07042d14ec0f09b332 + languageName: node + linkType: hard + +"which-collection@npm:^1.0.2": + version: 1.0.2 + resolution: "which-collection@npm:1.0.2" + dependencies: + is-map: "npm:^2.0.3" + is-set: "npm:^2.0.3" + is-weakmap: "npm:^2.0.2" + is-weakset: "npm:^2.0.3" + checksum: 10c0/3345fde20964525a04cdf7c4a96821f85f0cc198f1b2ecb4576e08096746d129eb133571998fe121c77782ac8f21cbd67745a3d35ce100d26d4e684c142ea1f2 + languageName: node + linkType: hard + +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.2" + checksum: 10c0/4465d5348c044032032251be54d8988270e69c6b7154f8fcb2a47ff706fe36f7624b3a24246b8d9089435a8f4ec48c1c1025c5d6b499456b9e5eff4f48212983 + languageName: node + linkType: hard + "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -10777,20 +10719,6 @@ __metadata: languageName: node linkType: hard -"wordwrap@npm:^1.0.0": - version: 1.0.0 - resolution: "wordwrap@npm:1.0.0" - checksum: 10c0/7ed2e44f3c33c5c3e3771134d2b0aee4314c9e49c749e37f464bf69f2bcdf0cbf9419ca638098e2717cff4875c47f56a007532f6111c3319f557a2ca91278e92 - languageName: node - linkType: hard - -"wordwrapjs@npm:^5.1.0": - version: 5.1.0 - resolution: "wordwrapjs@npm:5.1.0" - checksum: 10c0/e147162f139eb8c05257729fde586f5422a2d242aa8f027b5fa5adead1b571b455d0690a15c73aeaa31c93ba96864caa06d84ebdb2c32a0890602ab86a7568d1 - languageName: node - linkType: hard - "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" @@ -10876,13 +10804,6 @@ __metadata: languageName: node linkType: hard -"xmlcreate@npm:^2.0.4": - version: 2.0.4 - resolution: "xmlcreate@npm:2.0.4" - checksum: 10c0/fc4234e2d1942877d761d4f3d64410b54633d2ec60b13a5d56a6a06545aba39a0df8ed7ded10785a302f632eb4f0a4fedbf4bf10e17892e11d5075244b9e5705 - languageName: node - linkType: hard - "y18n@npm:^5.0.5": version: 5.0.8 resolution: "y18n@npm:5.0.8" @@ -10911,7 +10832,16 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^20.2.2": +"yaml@npm:^2.5.1": + version: 2.6.1 + resolution: "yaml@npm:2.6.1" + bin: + yaml: bin.mjs + checksum: 10c0/aebf07f61c72b38c74d2b60c3a3ccf89ee4da45bcd94b2bfb7899ba07a5257625a7c9f717c65a6fc511563d48001e01deb1d9e55f0133f3e2edf86039c8c1be7 + languageName: node + linkType: hard + +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" checksum: 10c0/0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 @@ -10985,3 +10915,17 @@ __metadata: checksum: 10c0/8f14c87d6b1b53c944c25ce7a28616896319d95bc46a9660fe441adc0ed0a81253b02b5abdaeffedbeb23bdd25a0bf1c29d2c12dd919aef6447652dd295e3e69 languageName: node linkType: hard + +"zwitch@npm:^1.0.0": + version: 1.0.5 + resolution: "zwitch@npm:1.0.5" + checksum: 10c0/26dc7d32e5596824b565db1da9650d00d32659c1211195bef50c25c60820f9c942aa7abefe678fc1ed0b97c1755036ac1bde5f97881d7d0e73e04e02aca56957 + languageName: node + linkType: hard + +"zwitch@npm:^2.0.4": + version: 2.0.4 + resolution: "zwitch@npm:2.0.4" + checksum: 10c0/3c7830cdd3378667e058ffdb4cf2bb78ac5711214e2725900873accb23f3dfe5f9e7e5a06dcdc5f29605da976fc45c26d9a13ca334d6eea2245a15e77b8fc06e + languageName: node + linkType: hard