readable.resume()
曆史
版本 | 變化 |
---|---|
v10.0.0 | 如果有 |
v0.9.4 | 添加於:v0.9.4 |
- 返回: <this>
readable.resume()
方法導致顯式暫停的 Readable
流恢複發射
事件,將流切換到流動模式。'data'
readable.resume()
方法可用於完全使用流中的數據,而無需實際處理任何數據:
getReadableStreamSomehow()
.resume()
.on('end', () => {
console.log('Reached the end, but did not read anything.');
});
如果有 'readable'
事件偵聽器,則 readable.resume()
方法無效。
相關用法
- Node.js stream.Readable.read([size])用法及代碼示例
- Node.js stream.Readable.reduce(fn[, initial[, options]])用法及代碼示例
- Node.js stream.Readable.take(limit[, options])用法及代碼示例
- Node.js stream.Readable.pipe(destination[, options])用法及代碼示例
- Node.js stream.Readable.setEncoding(encoding)用法及代碼示例
- Node.js stream.Readable.some(fn[, options])用法及代碼示例
- Node.js stream.Readable.map(fn[, options])用法及代碼示例
- Node.js stream.Readable.toArray([options])用法及代碼示例
- Node.js stream.Readable.isPaused()用法及代碼示例
- Node.js stream.Readable.forEach(fn[, options])用法及代碼示例
- Node.js stream.Readable.every(fn[, options])用法及代碼示例
- Node.js stream.Readable.from()用法及代碼示例
- Node.js stream.Readable.flatMap(fn[, options])用法及代碼示例
- Node.js stream.Readable.unshift(chunk[, encoding])用法及代碼示例
- Node.js stream.Readable.filter(fn[, options])用法及代碼示例
- Node.js stream.Readable.asIndexedPairs([options])用法及代碼示例
- Node.js stream.Readable.drop(limit[, options])用法及代碼示例
- Node.js stream.Readable.iterator([options])用法及代碼示例
- Node.js stream.Readable.wrap(stream)用法及代碼示例
- Node.js stream.Readable.find(fn[, options])用法及代碼示例
- Node.js stream.Readable.unpipe([destination])用法及代碼示例
- Node.js stream.Readable.pause()用法及代碼示例
- Node.js stream.Readable.from(iterable[, options])用法及代碼示例
- Node.js stream.Writable.uncork()用法及代碼示例
- Node.js stream.finished()用法及代碼示例
注:本文由純淨天空篩選整理自nodejs.org大神的英文原創作品 stream.Readable.resume()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。