Last active
October 30, 2017 16:52
-
-
Save jrunning/728c8e6525c807ff811ba3a0970c252b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('readline',{stdin:i,stdout:o,exit:e}=process).emitKeypressEvents(i) | |
w=s=>o.write(s) | |
n=0 | |
i.on('keypress',c=>w(c)&&c.charCodeAt()-97-n?e(w(` | |
Fail`)):!n++?s=d():n>25&&e(w(` | |
`+(d()-s)))).setRawMode(d=Date.now) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment