Skip to content

onesy-me/cache

Repository files navigation



onesy logo

onesy Cache

Cache


MIT license     Production ready     UMD 4.2kb gzipped     100% test cov     Browser and Nodejs

Very simple code     Modern code     Junior friendly     Typescript     Made with 💛


Getting started

Add

yarn add @onesy/cache

Use

  import OnesyCache from '@onesy/cache';

  const args = [4, { a: 4, ab: 4 }];

  // Args is made into a hash, which makes the key
  // a very useful, when you wanna cache a value based
  // on some complex amount of variables
  OnesyCache.add(4, ...args);

  OnesyCache.get(...args);

  // Output
  // 4

Dev

Install

yarn

Test

yarn test

Prod

Build

yarn build