From 16e62a02bd6ea398a518cd89df432851dc81e22d Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Sun, 4 Jul 2021 20:53:35 +1000 Subject: mrCoopDiff -n more to output the first n challenges only for debugging --- bin/mrCoopDiff.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin/mrCoopDiff.js') diff --git a/bin/mrCoopDiff.js b/bin/mrCoopDiff.js index 080aa28..c3066a3 100755 --- a/bin/mrCoopDiff.js +++ b/bin/mrCoopDiff.js @@ -34,6 +34,11 @@ const applyOperations = new Transform({ transform(challenge, encoding, callback) { challengeCount++ + if (argv.n && challengeCount > argv.n) { + callback() + return + } + if (!argv.quiet) { if (process.stdout.isTTY && challengeCount % 1000 === 0) { process.stdout.write(` ${challengeCount.toLocaleString()}\r`) -- cgit v1.2.3