
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Check if something is a Node.js stream
npm install is-stream
import fs from 'node:fs';
import {isStream} from 'is-stream';
isStream(fs.createReadStream('unicorn.png'));
//=> true
isStream({});
//=> false
Returns a boolean for whether it's a Stream.
Returns a boolean for whether it's a stream.Writable, an http.OutgoingMessage, an http.ServerResponse or an http.ClientRequest.
Returns a boolean for whether it's a stream.Readable or an http.IncomingMessage.
Returns a boolean for whether it's a stream.Duplex.
Returns a boolean for whether it's a stream.Transform.
Type: boolean
Default: true
When this option is true, the method returns false if the stream has already been closed.
isstream is another package that provides a similar functionality to is-stream. It checks if an object is a stream. The main difference is in the implementation and the specific checks performed. is-stream is more up-to-date and has more downloads, suggesting it is more popular and potentially more reliable.
stream-assert is a package that provides a set of assertion functions for streams, which can be used in testing. While it includes functionality to assert the type of streams, it goes beyond just checking if an object is a stream by offering a suite of assertions for stream content and behavior.
FAQs
Check if something is a Node.js stream
The npm package is-stream receives a total of 87,949,090 weekly downloads. As such, is-stream popularity was classified as popular.
We found that is-stream 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.