lkr
TypeScript icon, indicating that this package has built-in type declarations

0.5.3 • Public • Published

Lkr (Locker)

A fluent storage API

Travis Codecov

Installation

$ yarn add lkr

Usage

import { Lkr, Locker } from 'lkr';
 
// this will use include browser localStorage / sessionStorage by default
Locker.put('foo', { bar: 'baz' });
 
// Or define your own instance for use anywhere
const customLocker = new Lkr({
  drivers: {
    local: window.localStorage,
    session: window.sessionStorage,
  },
  driver: 'local',
  namespace: 'lkr',
  separator: '.'
});
 
customLocker.put('foo', { bar: 'baz' });
// etc

Readme

Keywords

none

Package Sidebar

Install

npm i lkr

Weekly Downloads

4

Version

0.5.3

License

MIT

Unpacked Size

232 kB

Total Files

57

Last publish

Collaborators

  • tymondesigns