Skip to content

💡 RFC: Drive the library from a config that's initialized.  #113

@isaiahdahl

Description

@isaiahdahl

Background & Motivation

We've talked about driving the library from some kind of .init({ ... }) function where we can turn on/off some behaviors from the config.

I think that the main "config" that a real user would interact with is one that sits in front of the editor project. But we still have to be able to pass that logic down to the chordsheetjs library.

Example:
normalizing suffix
...

Proposed Solution

import ChordSheetJS from 'chordsheetjs';

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.ChordSheetParser({ ...configOptions });
const song = parser.parse(chordSheet);

Open Questions

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more detailIssue description needs more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions