Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

read

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

rs.js

27

lib/read.js

@@ -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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc