Socket
Socket
Sign inDemoInstall

@cjs-mifi-test/is-stream

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cjs-mifi-test/is-stream

CJS version: Check if something is a Node.js stream


Version published
Maintainers
1
Install size
6.25 kB
Created

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 24 Jan 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • 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