is-stream

WebJar for is-stream

License

License

MIT
GroupId

GroupId

org.webjars.bowergithub.sindresorhus
ArtifactId

ArtifactId

is-stream
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

is-stream
WebJar for is-stream
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/is-stream

Download is-stream

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/is-stream/ -->
<dependency>
    <groupId>org.webjars.bowergithub.sindresorhus</groupId>
    <artifactId>is-stream</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/is-stream/
implementation 'org.webjars.bowergithub.sindresorhus:is-stream:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.sindresorhus/is-stream/
implementation ("org.webjars.bowergithub.sindresorhus:is-stream:1.1.0")
'org.webjars.bowergithub.sindresorhus:is-stream:jar:1.1.0'
<dependency org="org.webjars.bowergithub.sindresorhus" name="is-stream" rev="1.1.0">
  <artifact name="is-stream" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.sindresorhus', module='is-stream', version='1.1.0')
)
libraryDependencies += "org.webjars.bowergithub.sindresorhus" % "is-stream" % "1.1.0"
[org.webjars.bowergithub.sindresorhus/is-stream "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

is-stream Build Status

Check if something is a Node.js stream

Install

$ npm install is-stream

Usage

const fs = require('fs');
const isStream = require('is-stream');

isStream(fs.createReadStream('unicorn.png'));
//=> true

isStream({});
//=> false

API

isStream(stream)

Returns a boolean for whether it's a Stream.

isStream.writable(stream)

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

isStream.readable(stream)

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

isStream.duplex(stream)

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

isStream.transform(stream)

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

Related


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.

Versions

Version
1.1.0