Socket
Socket
Sign inDemoInstall

stream-to-string

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-to-string

Pipe a stream into a string, collect value with callback or promise


Version published
Weekly downloads
105K
decreased by-0.5%
Maintainers
1
Weekly downloads
 
Created
Source

stream-to-string

NPM version Build Status Coverage Status Davis Dependency Status

Pipe a stream into a string, collect value with callback or promise

example

var toString = require('..'),
    through2 = require('through2'),
    stream   = through2()

toString(stream, function (err, msg) {
    console.log(msg)
})

# or with promises
toString(stream).then(function (msg) {
    console.log(msg)
})

stream.write('this is a')
stream.write(' test')
stream.end()

api

var toString = require('stream-to-string')

toString(stream [, cb])

Collects stream data into a string. Executes optional callback with err, string. Returns a promise.

testing

npm test [--dot | --spec] [--coverage]

Alternatively, only run test files matching a certain pattern by prefixing the command with grep=pattern. Example: grep=init npm test

Open an html coverage report after running tests with npm run view-cover or npm run vc

Keywords

FAQs

Package last updated on 22 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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