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

stream-read-all

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-read-all - npm Package Compare versions

Comparing version 0.1.2 to 1.0.0

.nyc_output/5ae30f06d7ffd680833b9685883a337f.json

4

index.js

@@ -50,6 +50,4 @@ 'use strict'

})
streamReader.on('error', (err) => {
reject(err)
})
streamReader.on('error', reject)
})
}
{
"name": "stream-read-all",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.1.2",
"description": "stream-read-all",
"version": "1.0.0",
"description": "Returns a promise which resolves once all data in the supplied stream has been read",
"repository": "https://github.com/75lb/stream-read-all.git",

@@ -18,13 +18,13 @@ "keywords": [

"engines": {
"node": ">=4"
"node": ">=6"
},
"scripts": {
"test": "test-runner test/*.js",
"cover": "istanbul cover ./node_modules/.bin/test-runner test/*.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls && echo"
"cover": "nyc --reporter=text-lcov npm test | coveralls"
},
"dependencies": {},
"devDependencies": {
"coveralls": "^2.13.1",
"test-runner": "^0.4.0"
"coveralls": "^3.0.1",
"test-runner": "^0.5.0"
}
}

@@ -10,11 +10,24 @@ [![view on npm](https://img.shields.io/npm/v/stream-read-all.svg)](https://www.npmjs.org/package/stream-read-all)

Returns a promise which resolves once all data has been read.
Returns a promise which resolves once all data in the supplied stream has been read.
This example script...
```js
const stream = fs.createReadStream('./package.json')
const data = await streamReadAll(stream)
async function printInput () {
const streamReadAll = require('stream-read-all')
const stdin = await streamReadAll(process.stdin)
console.log(stdin.toString())
}
printInput()
```
...prints this output.
```
$ echo Hello | node example.js
Hello
```
* * *
&copy; 2017 Lloyd Brookes <75pound@gmail.com>.
&copy; 2017-18 Lloyd Brookes <75pound@gmail.com>.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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