|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
677 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | const isStream = stream =>
|
|---|
| 4 | stream !== null &&
|
|---|
| 5 | typeof stream === 'object' &&
|
|---|
| 6 | typeof stream.pipe === 'function';
|
|---|
| 7 |
|
|---|
| 8 | isStream.writable = stream =>
|
|---|
| 9 | isStream(stream) &&
|
|---|
| 10 | stream.writable !== false &&
|
|---|
| 11 | typeof stream._write === 'function' &&
|
|---|
| 12 | typeof stream._writableState === 'object';
|
|---|
| 13 |
|
|---|
| 14 | isStream.readable = stream =>
|
|---|
| 15 | isStream(stream) &&
|
|---|
| 16 | stream.readable !== false &&
|
|---|
| 17 | typeof stream._read === 'function' &&
|
|---|
| 18 | typeof stream._readableState === 'object';
|
|---|
| 19 |
|
|---|
| 20 | isStream.duplex = stream =>
|
|---|
| 21 | isStream.writable(stream) &&
|
|---|
| 22 | isStream.readable(stream);
|
|---|
| 23 |
|
|---|
| 24 | isStream.transform = stream =>
|
|---|
| 25 | isStream.duplex(stream) &&
|
|---|
| 26 | typeof stream._transform === 'function';
|
|---|
| 27 |
|
|---|
| 28 | module.exports = isStream;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.