mirror of
https://github.com/kanaka/mal.git
synced 2024-08-17 09:40:21 +03:00
PureScript: exiting with Ctrl-D
This commit is contained in:
parent
55a032b4c9
commit
d0814988e8
@ -4,7 +4,12 @@ var readlineSync = require('readline-sync')
|
||||
|
||||
exports.readLine = function (x) {
|
||||
return function () {
|
||||
return readlineSync.question(x)
|
||||
const result = readlineSync.question(x);
|
||||
|
||||
if(readlineSync.getRawInput() === String.fromCharCode(0)){
|
||||
return ":q"
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user