1.2.2 • Published 8 months ago

@abw/badger-filesystem v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Badger Filesystem

This provides a number of utility modules to make it easier working with directories and files in a node.js project.

Installation

Install badger-filesystem using your favourite package manager.

npm

npm add @abw/badger-filesystem

pnpm

pnpm add @abw/badger-filesystem

yarn

yarn add @abw/badger-filesystem

Documentation

Visit the website for documentation and examples.

Example

import { dir } from '@abw/badger-filesystem'

// a config directory
const config = dir('config');

// check it exists and create it if not
await config.mustExist({ create: true });

// create a JSON file in the directory
const hello = config.file('hello.json', { codec: 'json' });

// write some data to it
await hello.write({ message: 'Hello World!' });

// read data from it
const data = await hello.read();

Author

Andy Wardley https://github.com/abw

1.2.0

10 months ago

1.2.0-ts-alpha

10 months ago

1.2.2

8 months ago

1.2.1

10 months ago

1.1.0

1 year ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago