fs-aux
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

fs-aux is a minimalistic modern fs API extension, not a drop-in, just very few extra "missing" functions.

  • Does not monkey-patch anything
  • Uses native fs/promises (with the ups and the downs)
  • Only async functions
  • Uses fast-glob for glob
  • ESM only

API

import { saferRemove, glob, pathExists} from 'fs-aux';

// Will use fast-glob and then sort file paths 
let tsFiles = await glob('src/**/*.ts');

// Will remove only if child of ./ (by default) or throw error
await saferRemove('dist/');

// Will test if path "exists" (use fs/promises access and map try/catch to boolean
let distExists = await pathExists('dist/')

Package Sidebar

Install

npm i fs-aux

Weekly Downloads

87

Version

0.1.1

License

MIT

Unpacked Size

9.81 kB

Total Files

15

Last publish

Collaborators

  • jeremychone