mirror of
https://github.com/kanaka/mal.git
synced 2024-10-26 22:28:26 +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) {
|
exports.readLine = function (x) {
|
||||||
return function () {
|
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