is-stream-ended
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

is-stream-ended

Check if a stream has ended.

$ npm install --save is-stream-ended
var isStreamEnded = require('is-stream-ended');
 
isStreamEnded(stream); // false
stream.end();
isStreamEnded(stream); // true

isStreamEnded(stream)

stream

  • Type: Stream, Object

Providing a stream will check against the stream._readableState object. To check from the _writableState, provide that object directly.

Package Sidebar

Install

npm i is-stream-ended

Weekly Downloads

2,401,519

Version

0.1.4

License

MIT

Unpacked Size

2.68 kB

Total Files

5

Last publish

Collaborators

  • stephenplusplus