first-chunk-stream:转换流中的第一个块

时间:2024-06-15 01:47:42
【文件属性】:
文件名称:first-chunk-stream:转换流中的第一个块
文件大小:9KB
文件格式:ZIP
更新时间:2024-06-15 01:47:42
JavaScript 第一流 缓冲并转换流的前n个字节 安装 $ npm install first-chunk-stream 用法 const fs = require ( 'fs' ) ; const getStream = require ( 'get-stream' ) ; const FirstChunkStream = require ( 'first-chunk-stream' ) ; // unicorn.txt => unicorn rainbow const stream = fs . createReadStream ( 'unicorn.txt' ) . pipe ( new FirstChunkStream ( { chunkSize : 7 } , async ( chunk , encoding ) => { return chunk . toString ( encod
【文件预览】:
first-chunk-stream-main
----index.js(4KB)
----test.js(8KB)
----package.json(724B)
----index.test-d.ts(2KB)
----readme.md(2KB)
----.github()
--------funding.yml(91B)
--------workflows()
----license(1KB)
----index.d.ts(2KB)
----.gitignore(35B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitattributes(19B)

网友评论