1.0.2 • Published 5 years ago

tmp-store v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

tmp-store

Temporary file system cache with events and sub storage.

tslint: Slick code style: Prettier npm semantic-release License

Install

$ npm install tmp-store

Usage

Node.js / CommonJS:

const { TmpStore } = require('tmp-store')

ESNext / TypeScript:

import { TmpStore } from 'tmp-store'

API

Standard use:

const cache = new TmpStore('my-package')
const files = cache.getStore('files')
files.set('foo.json', '{ "hello": "world" }')

const fooContents = files.get('foo.json') // '{ "hello": "world" }'

// Save sync
cache.saveSync()

// or async
await cache.save()

Sponsors

Maintainers

License

MIT

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago