warpzone
v2.0.1
Published
A simplifier util for FS/IO operations
Maintainers
Readme
warpzone
Canonical URL:
https://alexstevovich.com/a/warpzone-nodejs
Software URL:
https://midnightcitylights.com/software/warpzone-nodejs
A simplifier util for FS/IO operations.
Installation
npm install warpzoneExample
import warpzone from 'warpzone';
// Read a file
const fileContent = warpzone.read('./path/to/file.txt');
console.log(fileContent);
// Write to a file
warpzone.write('./path/to/output.txt', 'This is some content.');
// Copy a file
warpzone.copy('./path/to/source.txt', './path/to/destination.txt');
// List files in a directory
const fileList = warpzone.list('./path/to/directory');
console.log(fileList);
// Aggregate content from multiple files into a single string
const aggregatedContent = await warpzone.string('./path/to/directory', {
recursive: true,
extensions: ['.txt', '.md'],
});
console.log(aggregatedContent);License
Licensed under the MIT License.
