1.0.0 • Published 2 years ago

@cheap-glitch/node-file-system v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

🗄 node-file-system

License Latest release Coverage status

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