@isbl/fs
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

@isbl/fs

MIT License npm dependencies Releases

Wraps node:fs/promises and sync functions from node:fs to add proper async error stack.

Install

yarn add @isbl/fs

If you are using typescript then you should also install type definitions

yarn add -D @types/node

Usage

Same as original wrapped functions, also includes typescript definitions. Note that this module is ESM-only so it can't be imported using require.

import fs from '@isbl/fs'
await fs.readFile(...)

// or

import { readFile } from '@isbl/fs'
await readFile(...)

To use *Sync functions import them from @isbl/fs/sync

import fs from '@isbl/fs/sync'
fs.readFileSync(...)

// or

import { readFileSync } from '@isbl/fs/sync'
readFileSync(...)

Available functions

See start of index.js and sync.js files. They list all the exports.

Readme

Keywords

none

Package Sidebar

Install

npm i @isbl/fs

Weekly Downloads

2

Version

0.5.0

License

MIT

Unpacked Size

8.96 kB

Total Files

8

Last publish

Collaborators

  • bellathewitch