Skip to content

roneyrao/keyv-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Filesystem storage adapter for Keyv.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published