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 Mar 2, 2024 via pnpm

is-stream 2.0.1

Check if something is a Node.js stream
Package summary
Share
0
issues
1
license
1
MIT
Package created
18 Jan 2015
Version published
26 Jul 2021
Maintainers
1
Total deps
1
Direct deps
0
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
1 Packages, Including:
is-stream@2.0.1
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

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

Visualizations

Frequently Asked Questions

What does is-stream do?

Is-stream is a convenient, lightweight npm package that enables developers to check if a given input is a Node.js stream. It provides a set of functions that return booleans based on whether the provided argument corresponds to a Stream, a Readable stream, a Writable stream, a Duplex stream, or a Transform stream.

How do you use is-stream?

To use is-stream, simply install the package via npm with the command npm install is-stream. Once installed, import it into your file using import {isStream} from 'is-stream';. You can then use the imported functions to check the type of your streams.

Here's a basic example of how you can use it:

import fs from 'node:fs';
import {isStream} from 'is-stream';

// Create a read stream
const readStream = fs.createReadStream('example.txt');

console.log(isStream(readStream)); // Logs: true
console.log(isStream({})); // Logs: false

This code creates a read stream from a file named 'example.txt' and then uses isStream to check if it is a stream, which returns true. It also uses isStream to check if an empty object is a stream, which returns false because the object is not a stream.

Where are the is-stream docs?

Documentation for the is-stream package can be found primarily in the README file within the is-stream repository on GitHub. This file provides an overview of the package, including its installation, usage, and API functionality.