prettier fixes
This commit is contained in:
parent
cbc90f7110
commit
1b9a02fa20
|
@ -1,5 +1,10 @@
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
|
||||||
|
/** code to create a new CUE file, as per the standard
|
||||||
|
* with a REM PERFORMER, TITLE, FILE attribute
|
||||||
|
* and a list of tracks provided as input
|
||||||
|
*/
|
||||||
|
|
||||||
// https://en.wikipedia.org/wiki/Cue_sheet_(computing)
|
// https://en.wikipedia.org/wiki/Cue_sheet_(computing)
|
||||||
export function generate(data, outputFile) {
|
export function generate(data, outputFile) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -161,7 +161,11 @@ var dropInvalid = function (e) {
|
||||||
|
|
||||||
export function parse(
|
export function parse(
|
||||||
text,
|
text,
|
||||||
options = { artist: "Unknown", forceTimestamps: false, forceDurations: false }
|
options = {
|
||||||
|
artist: "Unknown",
|
||||||
|
forceTimestamps: false,
|
||||||
|
forceDurations: false,
|
||||||
|
},
|
||||||
) {
|
) {
|
||||||
_options = options;
|
_options = options;
|
||||||
let durations = false;
|
let durations = false;
|
||||||
|
|
|
@ -152,7 +152,7 @@ describe("Parser", function () {
|
||||||
let result = parse(
|
let result = parse(
|
||||||
`1. Artist - Title 5:00
|
`1. Artist - Title 5:00
|
||||||
2. Another Artist - Another Title 4:20`,
|
2. Another Artist - Another Title 4:20`,
|
||||||
{ forceTimestamps: true }
|
{ forceTimestamps: true },
|
||||||
);
|
);
|
||||||
assert.deepEqual(result[0].end, {
|
assert.deepEqual(result[0].end, {
|
||||||
ts: "00:4:20",
|
ts: "00:4:20",
|
||||||
|
@ -174,7 +174,7 @@ describe("Parser", function () {
|
||||||
let result = parse(
|
let result = parse(
|
||||||
`1. Artist - Title 1:00
|
`1. Artist - Title 1:00
|
||||||
2. Another Artist - Another Title 1:15`,
|
2. Another Artist - Another Title 1:15`,
|
||||||
{ forceDurations: true }
|
{ forceDurations: true },
|
||||||
);
|
);
|
||||||
assert.deepEqual(result[0], {
|
assert.deepEqual(result[0], {
|
||||||
track: 1,
|
track: 1,
|
||||||
|
|
Loading…
Reference in New Issue