through2-sync:同步 through2 变换

时间:2021-05-31 18:41:53
【文件属性】:
文件名称:through2-sync:同步 through2 变换
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-31 18:41:53
JavaScript 通过2同步 同步转换。 描述 该API是一样的 (包括through.obj助手),但是回调函数是同步的。 例子 const Stream = require ( 'stream' ) const through = require ( 'through2-sync' ) const stream = new Stream . Readable ( ) stream . _read = ( ) => { } stream . pipe ( through ( chunk => chunk . toString ( ) . toUpperCase ( ) , ( ) => 'last chunk\n' ) ) . pipe ( process . stdout ) stream . push ( 'hello\n' ) // HELLO stream . pu
【文件预览】:
through2-sync-master
----.gitignore(14B)
----package.json(588B)
----index.js(623B)
----test.js(499B)
----UNLICENSE(1KB)
----README.md(755B)

网友评论