diff options
author | Andrew Harvey <andrew@alantgeo.com.au> | 2021-07-04 20:53:35 +1000 |
---|---|---|
committer | Andrew Harvey <andrew@alantgeo.com.au> | 2021-07-04 20:53:35 +1000 |
commit | 16e62a02bd6ea398a518cd89df432851dc81e22d (patch) | |
tree | 2e145367cb1d12114a1882d024f48712038d2595 /bin/mrCoopDiff.js | |
parent | 3f5dccb9a6a1f443afedc2ab44fed61f8be4c712 (diff) |
mrCoopDiff -n more to output the first n challenges only for debugging
Diffstat (limited to 'bin/mrCoopDiff.js')
-rwxr-xr-x | bin/mrCoopDiff.js | 5 |
1 files changed, 5 insertions, 0 deletions
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`) |