文件名称:first-n-stream:从流中获取前n个对象
文件大小:4KB
文件格式:ZIP
更新时间:2024-05-29 09:08:39
JavaScript
第一流 通过的objectMode流将前n个条目转移到另一个流或回调中 npm install --save first-n-stream 原料药 var FirstN = require ( 'first-n-stream' ) ; var withCallback = new FirstN ( 5 , function ( err , resp ) { // resp will be an array of the first 5 items } ) ; something . pipe ( withCallback ) . pipe ( streamThatWillGetTheRest ) ; var withStream = new FirstN ( 5 , streamThatWillGetTheFirst5 ) ; something . pipe ( withStream
【文件预览】:
first-n-stream-master
----license.md(1KB)
----toArray.js(579B)
----package.json(732B)
----readme.md(540B)
----index.js(1KB)
----test.js(2KB)