chord-mark-jsdom
v0.18.0
Published
NodeJs compatible version of ChordMark
Downloads
320
Readme
ChordMark jsdom
A nodeJs-compatible version of ChordMark, to use for server-side use-cases such as SSR. There is a separate package for it as it bundles jsdom which is obviously not needed for client-side usage.
Installation
npm install chord-mark-jsdomUsage
This module exposes the same API than ChordMark so the usage is identical.
Under the hood, it will pass a jsdom window object to the parsing and rendering functions.
import { parseSong, renderSong } from 'chord-mark-jsdom';
const song = 'C.. G..\n' + 'When I _find myself in _times of trouble';
const parsed = parseSong(song);
const rendered = renderSong(parsed);