flipcache

0.0.12 • Public • Published

💾💸 flipcache

NPM version MIT License fliphub flipfam

[temporary], safe, restorable, cacheable, configurable, chainable/fluent data

📦 usage

yarn add flipcache
npm i flipcache --save
const flipcache = require('flipcache')

📘 examples

const onthefly = flipcache
  .from('fromfile').end()
  .to('otherfile')
  .autoRemove(2000)
const mocha = flipcache
  .from('mochaOptsFile').end()
  .to('mochaOptsBackupFile')
  .autoRestore(2000)
const datas = flipcache
  .from('./index.js')
  .load()
  .json()
  .update({eh: true})
  .parse() // optional, is done for you
  .clean()
  .write()

👣 dir

const datas = flipcache
  .from('./index.js')
  .dir(__dirname)
  .json()
  .setIfNotEmpty({eh: true})
  .write()

👽 exports

const {
  File,
  Files,
  Core,
  Cache,
  JSONChain,
  ConfigStore,
  FlipFind,
  fliphash,
} = require('flipcache')

🔗 more

  • for json, json-chain is used
  • for resolving paths (unless .dir is used), flipfind is used
  • for all fs operations, flipfile is used

Package Sidebar

Install

npm i flipcache

Weekly Downloads

8

Version

0.0.12

License

none

Last publish

Collaborators

  • aretecode