@cheap-glitch/node-file-system
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

🗄 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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00
0.1.00

Package Sidebar

Install

npm i @cheap-glitch/node-file-system

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

14.2 kB

Total Files

13

Last publish

Collaborators

  • cheap-glitch