Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 14, 2024 via pnpm

end-of-stream 1.4.4

Call a callback when a readable/writable/duplex stream has completed or failed.
Package summary
Share
0
issues
2
licenses
2
ISC
1
MIT
Package created
26 Nov 2013
Version published
25 Sep 2019
Maintainers
1
Total deps
3
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

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
2 Packages, Including:
once@1.4.0
wrappy@1.0.2

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
1 Packages, Including:
end-of-stream@1.4.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

1
All Dependencies CSV
β“˜ This is a list of end-of-stream 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
once1.4.01.93 kBISC
prod

Visualizations

Frequently Asked Questions

What does end-of-stream do?

The "end-of-stream" is a valuable node module used in the application of JavaScript programming. It performs a simple yet crucial task of calling a callback function when a readable, writable or duplex stream has either completed or encountered a failure. This could be instrumental in dealing with real-time data flows in server-side programming where recognizing the end of a data stream is critical.

How do you use end-of-stream?

The use of "end-of-stream" is very direct and straightforward. To begin with, you must first install the module through npm using npm install end-of-stream. Upon successful installation, the module can be utilized by importing it to your JavaScript code with var eos = require('end-of-stream');. By following the established syntax, this subsequently allows you to call the callback function at the end of various types of data streams. The syntax for using "end-of-stream" differs depending on the stream type and event listened to as showcased by the following examples:

var eos = require('end-of-stream');

// For a readable stream
eos(readableStream, function(err) {
  if (err) return console.log('stream had an error or closed early');
  console.log('stream has ended', this === readableStream);
});

// For a writable stream
eos(writableStream, function(err) {
  if (err) return console.log('stream had an error or closed early');
  console.log('stream has finished', this === writableStream);
});
...

Where are the end-of-stream docs?

In terms of its documentation, the "end-of-stream" package can be referred to via the npm directory, which typically has extensive information for most node modules. However, for a detailed overview of the "end-of-stream" module, you can visit the GitHub repository for comprehensive information including usage examples and related utilities. The GitHub repository for "end-of-stream" is git://github.com/mafintosh/end-of-stream.git.