From 8a570f74ad13f26fec8240a4abcdabd77662c240 Mon Sep 17 00:00:00 2001 From: Nemo Date: Fri, 26 Aug 2022 18:36:33 +0530 Subject: [PATCH] Prettier fixes --- index.js | 2 +- src/parser.js | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index e94fe72..7d9eb02 100755 --- a/index.js +++ b/index.js @@ -74,7 +74,7 @@ if (argv.version) { artist, forceTimestamps, forceDurations, - length: Number(info.videoDetails.lengthSeconds) + length: Number(info.videoDetails.lengthSeconds), }); generate({ tracks, artist, audioFile, album }, output_file); console.log(`"${output_file}" saved`); diff --git a/src/parser.js b/src/parser.js index ea0d421..17c67ba 100644 --- a/src/parser.js +++ b/src/parser.js @@ -153,11 +153,11 @@ var fixDurations = function (list) { } }; -var dropInvalid = function(e) { +var dropInvalid = function (e) { // All tracks should start before the closing time - if (_options.length) return (e.start.calc < _options.length); + if (_options.length) return e.start.calc < _options.length; return true; -} +}; export function parse( text, @@ -190,5 +190,10 @@ export function parse( } } - return result.map(parseTitle).map(parseArtist).map(addTrack).map(addEnd).filter(dropInvalid); + return result + .map(parseTitle) + .map(parseArtist) + .map(addTrack) + .map(addEnd) + .filter(dropInvalid); }