node-useful
v0.0.1
Published
Node.js 工具方法
Downloads
53
Readme
node-useful
Node.js 工具方法。点击查看在线文档。
安装
npm install node-useful
yarn add node-useful
pnpm add node-useful
使用
import { getBuffer } from 'node-useful';
async function something() {
const buf = await getBuffer('xxx');
// next ...
}
API
- bufferToStream - buffer 转 stream
- streamToBuffer - stream 转 buffer
- getBuffer - 获取本地或远程文件 buffer