Skip to content

cheap-glitch/node-file-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—„ 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

About

๐Ÿ—„ Tiny convenience wrapper around Node.js file system APIs.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project