Write Any File!
Write to any file you want in any format.
Design Philosophy
This is a handy tool for save user configuration files in user's preferred format. Use with Load Any File! for better coding experience.
Installation
npm i write-any-file -s
Usage
To write to a file asynchronously:
await ;await ;await ;
To write to a file synchronously:
writeFile.syncdata, '/home/john/config.json';writeFile.syncdata, '/home/john/config.coffee';writeFile.syncdata, '/home/john/config.yaml';
API
writeFile(data: any, location: string): Promise;
Write data
to location
asynchronously.
writeFile.sync(data: any, location: string): void;
Write data
to location
synchronously.
Change Log
- 0.1.0 (2019-05-23)
- basic functionality
License
MIT © Zhang Kai Yu