Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
stream-to-string
Advanced tools
Pipe a stream into a string, collect value with callback or promise
Pipe a stream into a string, collect value with callback or promise
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()
var toString = require('stream-to-string')
Collects stream data into a string. Accepts an optional encoding argument used when converting the stream. Executes optional callback with err, string
. Returns a promise.
npm test [--dot | --spec] [--coverage | --grep=pattern]
Specifying --dot
or --spec
will change the output from the default TAP style.
Specifying --coverage
will print a text coverage summary to the terminal after
tests have ran, while --pattern
will only run the test files that match the given
pattern.
Open an html coverage report with npm run view-cover
.
FAQs
Pipe a stream into a string, collect value with callback or promise
We found that stream-to-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.