Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 3, 2024 via pnpm

concat-stream 1.6.2

writable stream that concatenates strings or binary data and calls a callback with the result
Package summary
Share
0
issues
2
licenses
10
MIT
1
ISC
Package created
3 Aug 2012
Version published
21 Mar 2018
Maintainers
3
Total deps
11
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
10 Packages, Including:
buffer-from@1.1.2
concat-stream@1.6.2
core-util-is@1.0.3
isarray@1.0.0
process-nextick-args@2.0.1
readable-stream@2.3.8
safe-buffer@5.1.2
string_decoder@1.1.1
typedarray@0.0.6
util-deprecate@1.0.2

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
inherits@2.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of concat-stream 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
buffer-from1.1.22.26 kBMIT
prod
inherits2.0.41.98 kBISC
prod
readable-stream2.3.825.14 kBMIT
prod
typedarray0.0.67.31 kBMIT
prod

Visualizations

Frequently Asked Questions

What does concat-stream do?

Concat-Stream is a writable stream utility that concatenates all data from a stream and calls a callback with the compiled result. It proves especially useful when you need to collect all data from a stream into a single buffer. It's suitable for situations where you can accommodate the stream's entire output in a single Buffer, like within RAM. Notably, it also supports objectMode streams emitting objects other than Buffers.

How do you use concat-stream?

Utilizing Concat-Stream requires you first to install the package into your project. You can accomplish this by running npm install concat-stream in your project directory.

Once installed, you can use Concat-Stream as shown in the examples below:

  1. To concatenate Buffers:
var fs = require('fs')
var concat = require('concat-stream')

var readStream = fs.createReadStream('cat.png')
var concatStream = concat(gotPicture)

readStream.on('error', handleError)
readStream.pipe(concatStream)

function gotPicture(imageBuffer) {
  // imageBuffer is all of `cat.png` as a node.js Buffer
}

function handleError(err) {
  // handle your error appropriately here, e.g.:
  console.error(err) // print the error to STDERR
  process.exit(1) // exit program with non-zero exit code
}
  1. To concatenate Arrays:
var write = concat(function(data) {})
write.write([1,2,3])
write.write([4,5,6])
write.end()
// data will be [1,2,3,4,5,6] in the above callback
  1. To concatenate Uint8Arrays:
var write = concat(function(data) {})
var a = new Uint8Array(3)
a[0] = 97; a[1] = 98; a[2] = 99
write.write(a)
write.write('!')
write.end(Buffer.from('!!1'))

Where are the concat-stream docs?

The Concat-Stream documentation can be found on the project's GitHub page at https://github.com/maxogden/concat-stream. In addition to the package's description and usage examples, the documentation provides information on error handling, licensing, and related stream utilities under the mississippi stream utility collection. Simply navigate to the provided URL to peruse the full documentation.