repl.history
Advanced tools
Comparing version 0.1.3 to 0.1.4
10
index.js
@@ -12,6 +12,12 @@ var fs = require('fs'); | ||
var fd = fs.openSync(file, 'a'), reval = repl.eval; | ||
var wstream = fs.createWriteStream(file, { | ||
fd: fd | ||
}); | ||
wstream.on('error', function(err) { | ||
throw err; | ||
}); | ||
repl.rli.addListener('line', function(code) { | ||
if (code && code !== '.history') { | ||
fs.write(fd, code + '\n'); | ||
wstream.write(code + '\n'); | ||
} else { | ||
@@ -27,3 +33,3 @@ repl.rli.historyIndex++; | ||
repl.commands['.history'] = { | ||
repl.commands['history'] = { | ||
help : 'Show the history', | ||
@@ -30,0 +36,0 @@ action : function() { |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"repository": { | ||
@@ -15,0 +15,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3250
38