stdinfile
v0.0.1
Published
`await file('').json(); await stdin().json()`; utilities for reading and writing files, as well as reading from stdin.
Downloads
2
Maintainers
Readme
1stream
🚀 A set of utilities for reading and writing files, as well as reading from stdin. Inspired by
Bun.file()
andBun.stdin()
.
npm install 1stream
import * as stream from 'stdinfile';
const data: Yours = await stream.file('abc.json').json();
const data2: string = await stream.file('abc.json').text();
const stdin: Yours = await stream.stdin().json();
// OR
const stdin2: string = await stream.stdin().text();
await stream.write('output.json', data2);
LICENSE
New BSD License ©Ninh Pham - ReeganExE