index.js 232 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 'use strict'; module.exports = function (stream) { var ended; if (typeof stream.ended !== 'undefined') { ended = stream.ended; } else { ended = stream._readableState.ended; } return Boolean(ended).valueOf(); };