lyrics-structure
Version:
Parse lyrics with bracketed sections into structured parts, with slide generation for presentations
48 lines (40 loc) • 1.16 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const slide_1 = require("./slide");
const comprehensiveInput = `
[]
First line of verse
Second line of verse
Third line of verse
Fourth line of verse
Fifth line of verse
[/verse]
[]
(inside parentheses)
Regular text line 1
Regular text line 2
[]
First chorus line
Second chorus line
[/chorus]
[]
This is a very long line that should be considered too long for the slide
This is another very long line that should also be considered too long
Short line 1
Short line 2
[/verse 1]
Regular line 1
Regular line 2
More content
This is a very long line that exceeds forty characters for testing purposes
This is another very long line that also exceeds the forty character limit
Another very long line that should be considered too long for the slide
And yet another very long line that should be split into a new section
Regular line
[]
First line with spaces
Second line with spaces
[/verse 2]
[]`;
console.log('Output from getSlideParts:');
console.log(JSON.stringify((0, slide_1.getSlideParts)(comprehensiveInput), null, 2));