Add is.nodeStream() (#34)
This commit is contained in:
parent
ae3adc9818
commit
a04a04c131
4 changed files with 38 additions and 1 deletions
10
readme.md
10
readme.md
|
|
@ -211,6 +211,16 @@ is.inRange(3, 10);
|
|||
|
||||
Returns `true` if `value` is a DOM Element.
|
||||
|
||||
##### .nodeStream(value)
|
||||
|
||||
Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html).
|
||||
|
||||
```js
|
||||
const fs = require('fs');
|
||||
is.nodeStream(fs.createReadStream('unicorn.png'));
|
||||
//=> true
|
||||
```
|
||||
|
||||
##### .infinite(value)
|
||||
|
||||
Check if `value` is `Infinity` or `-Infinity`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue