🗄 node-file-system
This is a tiny wrapper around some of the file system APIs of Node.js, with a few convenient helpers thrown in. Its main purpose is to keep a consistent and expressive interface to the file system across various projects.
This package is only available as an ESM module
Features
- Helpers for common file system tasks
- Wrappers with expressive names and useful options enabled by default
- Variants of built-in functions that return
undefined
instead of throwing an error
Installation
npm i @cheap-glitch/node-file-system
Usage
import { tryGettingFileContents, removeDirectory } from 'node-file-system';
const fileContents = tryGettingFileContents(new URL('temp/file.txt', import.meta.url)) ?? '';
removeDirectory(new URL('temp', import.meta.url));
Changelog
See the full changelog here.
Contributing
Contributions are welcomed! Please open an issue before submitting substantial changes.
Related
License
ISC