isstream

WebJar for isstream

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

isstream
Последняя версия

Последняя версия

0.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

isstream
WebJar for isstream
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/rvagg/isstream

Скачать isstream

Как подключить последнюю версию

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

isStream

Build Status

Test if an object is a Stream

NPM

The missing Stream.isStream(obj): determine if an object is standard Node.js Stream. Works for Node-core Stream objects (for 0.8, 0.10, 0.11, and in theory, older and newer versions) and all versions of readable-stream.

Usage:

var isStream = require('isstream')
var Stream = require('stream')

isStream(new Stream()) // true

isStream({}) // false

isStream(new Stream.Readable())    // true
isStream(new Stream.Writable())    // true
isStream(new Stream.Duplex())      // true
isStream(new Stream.Transform())   // true
isStream(new Stream.PassThrough()) // true

But wait! There's more!

You can also test for isReadable(obj), isWritable(obj) and isDuplex(obj) to test for implementations of Streams2 (and Streams3) base classes.

var isReadable = require('isstream').isReadable
var isWritable = require('isstream').isWritable
var isDuplex = require('isstream').isDuplex
var Stream = require('stream')

isReadable(new Stream()) // false
isWritable(new Stream()) // false
isDuplex(new Stream())   // false

isReadable(new Stream.Readable())    // true
isReadable(new Stream.Writable())    // false
isReadable(new Stream.Duplex())      // true
isReadable(new Stream.Transform())   // true
isReadable(new Stream.PassThrough()) // true

isWritable(new Stream.Readable())    // false
isWritable(new Stream.Writable())    // true
isWritable(new Stream.Duplex())      // true
isWritable(new Stream.Transform())   // true
isWritable(new Stream.PassThrough()) // true

isDuplex(new Stream.Readable())    // false
isDuplex(new Stream.Writable())    // false
isDuplex(new Stream.Duplex())      // true
isDuplex(new Stream.Transform())   // true
isDuplex(new Stream.PassThrough()) // true

Reminder: when implementing your own streams, please use readable-stream rather than core streams.

License

isStream is Copyright (c) 2015 Rod Vagg @rvagg and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

Версии библиотеки

Версия
0.1.2