Comparing version 1.0.4 to 1.0.5
@@ -20,15 +20,2 @@ | ||
var output = opts.output || process.stdout | ||
var m = new Mute({ replace: opts.replace }) | ||
m.pipe(output, {end: false}) | ||
output = m | ||
var def = opts.default || '' | ||
var terminal = !!(opts.terminal || output.isTTY) | ||
var rlOpts = { input: input, output: output, terminal: terminal } | ||
if (process.version.match(/^v0\.6/)) { | ||
var rl = readline.createInterface(rlOpts.input, rlOpts.output) | ||
} else { | ||
var rl = readline.createInterface(rlOpts) | ||
} | ||
var prompt = (opts.prompt || '').trim() + ' ' | ||
@@ -39,2 +26,3 @@ var silent = opts.silent | ||
var def = opts.default || '' | ||
if (def) { | ||
@@ -49,3 +37,16 @@ if (silent) { | ||
} | ||
var terminal = !!(opts.terminal || output.isTTY) | ||
var m = new Mute({ replace: opts.replace, prompt: prompt }) | ||
m.pipe(output, {end: false}) | ||
output = m | ||
var rlOpts = { input: input, output: output, terminal: terminal } | ||
if (process.version.match(/^v0\.6/)) { | ||
var rl = readline.createInterface(rlOpts.input, rlOpts.output) | ||
} else { | ||
var rl = readline.createInterface(rlOpts) | ||
} | ||
output.unmute() | ||
@@ -52,0 +53,0 @@ rl.setPrompt(prompt) |
{ | ||
"name": "read", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"main": "lib/read.js", | ||
"dependencies": { | ||
"mute-stream": "~0.0.2" | ||
"mute-stream": "~0.0.4" | ||
}, | ||
@@ -8,0 +8,0 @@ "devDependencies": { |
@@ -30,4 +30,4 @@ ## read | ||
* `terminal` Treat the output as a TTY, whether it is or not. | ||
* `stdin` Readable stream to get input data from. (default `process.stdin`) | ||
* `stdout` Writeable stream to write prompts to. (default: `process.stdout`) | ||
* `input` Readable stream to get input data from. (default `process.stdin`) | ||
* `output` Writeable stream to write prompts to. (default: `process.stdout`) | ||
@@ -34,0 +34,0 @@ If silent is true, and the input is a TTY, then read will set raw |
@@ -55,2 +55,4 @@ var tap = require('tap') | ||
passMatch: (pass === pass2)})) | ||
if (process.stdin.unref) | ||
process.stdin.unref() | ||
}) | ||
@@ -57,0 +59,0 @@ }) |
@@ -55,2 +55,4 @@ var tap = require('tap') | ||
passMatch: (pass === pass2)})) | ||
if (process.stdin.unref) | ||
process.stdin.unref() | ||
}) | ||
@@ -57,0 +59,0 @@ }) |
@@ -35,2 +35,4 @@ var tap = require('tap') | ||
r11, r12, r13, r14, r15, r16, r17, r18) | ||
if (process.stdin.unref) | ||
process.stdin.unref() | ||
})})})})})})})})})})})})})})})})})}) | ||
@@ -37,0 +39,0 @@ } |
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
12854
10
296
Updatedmute-stream@~0.0.4