aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mrCoopDiff.js5
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`)