keyv-fs

1.0.2 • Public • Published

keyv-fs

NPM Version Build Status codecov License

Filesystem storage adapter for Keyv. Especially useful for browser cache.

Install

npm install keyv-fs

Usage

const Keyv = require('keyv');
const KeyvFs = require('keyv-fs');

const fsStore = new KeyvFs();
const keyv = new Keyv({ store: fsStore });

Api

new KeyvFs(fs, rootDir, clean)
  • fs: custom file system, such as memory-fs, if omited, local file system is implied.

  • rootDir: directory where cache folder is placed, process.cwd() is by default. Cache folder is named with keyvs namespace.

  • clean: whether to clear the cache folder when startup, false by default.

License

MIT.

/keyv-fs/

    Package Sidebar

    Install

    npm i keyv-fs

    Weekly Downloads

    3

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    10.3 kB

    Total Files

    4

    Last publish

    Collaborators

    • roney