【文件属性】:
文件名称:get-stream:以字符串,缓冲区或数组的形式获取流
文件大小:10KB
文件格式:ZIP
更新时间:2021-04-29 16:27:56
JavaScript
获得流
以字符串,缓冲区或数组的形式获取流
安装
$ npm install get-stream
用法
const fs = require ( 'fs' ) ;
const getStream = require ( 'get-stream' ) ;
( async ( ) => {
const stream = fs . createReadStream ( 'unicorn.txt' ) ;
console . log ( await getStream ( stream ) ) ;
/*
,,))))))));,
__)))))))))))))),
\|/ -\(((((''''((((((((.
-*-==//////(('' . `)))))),
/|\ ))| o ;-.
【文件预览】:
get-stream-main
----index.test-d.ts(1KB)
----.gitattributes(19B)
----.github()
--------funding.yml(116B)
--------security.md(179B)
--------workflows()
----test.js(4KB)
----buffer-stream.js(894B)
----license(1KB)
----index.d.ts(4KB)
----fixture(8B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitignore(23B)
----index.js(1KB)
----readme.md(4KB)
----package.json(819B)