UNPKG

chordsong

Version:

ChordSong is a simple text format for the notation of lyrics with guitar chords, and an application that renders them to portable HTML pages.

23 lines 745 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Chord = void 0; class Chord { constructor(name, diagram, chordVariant) { this.diagrams = {}; this.name = name; this.defaultDiagramKey = Symbol('defaultDiagramKey'); if (diagram !== undefined) { this.setDiagram(diagram, chordVariant); } } getDiagram(variant) { const chordVariantKey = variant ?? this.defaultDiagramKey; return this.diagrams[chordVariantKey]; } setDiagram(diagram, variant) { const chordVariantKey = variant ?? this.defaultDiagramKey; this.diagrams[chordVariantKey] = diagram; } } exports.Chord = Chord; //# sourceMappingURL=Chord.js.map