🏡 index : github.com/captn3m0/youtube-cue.git

author Nemo <commits@captnemo.in> 2023-07-06 17:20:29.0 +05:30:00
committer Nemo <me@captnemo.in> 2023-07-31 15:02:08.0 +05:30:00
commit
1b9a02fa207e889f5e6cfe320b945d9b95f83e58 [patch]
tree
570626ac3f18e135b666c5fa28dd8733f9cae1d4
parent
cbc90f71109b08f3202e5f4db1bd7f713cfd3b0b
download
1b9a02fa207e889f5e6cfe320b945d9b95f83e58.tar.gz

prettier fixes



Diff

 src/cue.js          | 5 +++++
 src/parser.js       | 6 ++++++
 test/parser_test.js | 4 ++--
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/cue.js b/src/cue.js
index 1767ece..7cb7378 100644
--- a/src/cue.js
+++ a/src/cue.js
@@ -1,5 +1,10 @@
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)
export function generate(data, outputFile) {
  try {
diff --git a/src/parser.js b/src/parser.js
index 17c67ba..930a571 100644
--- a/src/parser.js
+++ a/src/parser.js
@@ -161,7 +161,11 @@

export function parse(
  text,
  options = { artist: "Unknown", forceTimestamps: false, forceDurations: false }
  options = {
    artist: "Unknown",
    forceTimestamps: false,
    forceDurations: false,
  },
) {
  _options = options;
  let durations = false;
diff --git a/test/parser_test.js b/test/parser_test.js
index 3085c67..8c0c6cb 100644
--- a/test/parser_test.js
+++ a/test/parser_test.js
@@ -152,7 +152,7 @@
    let result = parse(
      `1. Artist - Title 5:00
2. Another Artist - Another Title 4:20`,
      { forceTimestamps: true }
      { forceTimestamps: true },
    );
    assert.deepEqual(result[0].end, {
      ts: "00:4:20",
@@ -174,7 +174,7 @@
    let result = parse(
      `1. Artist - Title 1:00
2. Another Artist - Another Title 1:15`,
      { forceDurations: true }
      { forceDurations: true },
    );
    assert.deepEqual(result[0], {
      track: 1,