Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis.Learn more
Socket
Socket

is-stream

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

is-stream

Check if something is a Node.js stream

    3.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
64,451,489
increased by9.72%

Weekly downloads

Readme

Source

is-stream

Check if something is a Node.js stream

Install

$ npm install is-stream

Usage

import fs from 'node:fs'; import {isStream} from 'is-stream'; isStream(fs.createReadStream('unicorn.png')); //=> true isStream({}); //=> false

API

isStream(stream)

Returns a boolean for whether it's a Stream.

isWritableStream(stream)

Returns a boolean for whether it's a stream.Writable.

isReadableStream(stream)

Returns a boolean for whether it's a stream.Readable.

isDuplexStream(stream)

Returns a boolean for whether it's a stream.Duplex.

isTransformStream(stream)

Returns a boolean for whether it's a stream.Transform.

  • is-file-stream - Detect if a stream is a file stream

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

Last updated on 10 Aug 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
Socket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc