Socket
Socket
Sign inDemoInstall

read

Package Overview
Dependencies
Maintainers
7
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 2.0.0 to 2.1.0

6

lib/read.js

@@ -8,2 +8,3 @@ const readline = require('readline')

output = process.stdout,
completer,
prompt = '',

@@ -39,3 +40,3 @@ silent,

return new Promise((resolve, reject) => {
const rl = readline.createInterface({ input, output, terminal })
const rl = readline.createInterface({ input, output, terminal, silent: true, completer })
const timer = timeout && setTimeout(() => onError(new Error('timed out')), timeout)

@@ -71,7 +72,6 @@

output.unmute()
output.write('\r\n')
}
done()
// truncate the \n at the end.
const res = line.replace(/\r?\n$/, '') || def || ''
const res = line.replace(/\r?\n?$/, '') || def || ''
return resolve(res)

@@ -78,0 +78,0 @@ })

{
"name": "read",
"version": "2.0.0",
"version": "2.1.0",
"main": "lib/read.js",

@@ -10,3 +10,3 @@ "dependencies": {

"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.11.0",
"@npmcli/template-oss": "4.13.0",
"tap": "^16.3.0"

@@ -39,3 +39,4 @@ },

"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.11.0"
"version": "4.13.0",
"publish": "true"
},

@@ -42,0 +43,0 @@ "tap": {

@@ -32,2 +32,3 @@ ## read

* `output` Writable stream to write prompts to. (default: `process.stdout`)
* `completer` Autocomplete callback (see [official api](https://nodejs.org/api/readline.html#readline_readline_createinterface_options) for details

@@ -34,0 +35,0 @@ If silent is true, and the input is a TTY, then read will set raw

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