Socket
Socket
Sign inDemoInstall

@cheap-glitch/node-file-system

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cheap-glitch/node-file-system

Tiny convenience wrapper around Node.js file system APIs.


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
13.9 kB
Created
Weekly downloads
 

Readme

Source

🗄 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.

License

ISC

Keywords

FAQs

Last updated on 26 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc