npm.io
0.1.0 • Published 7 years ago

large-locastorage

Licence
MIT
Version
0.1.0
Deps
0
Size
22 kB
Vulns
0
Weekly
0

large-localstorage

Safe local storage wrapper for large data.

Build Status Coverage Status npm Version npm Download npm License

Usage

  • Install

npm i --save large-localstorage

  • API

API is same with window.localstorage.

import lls from 'large-localstorage';

lls.setItem('string', 'hello world!');
lls.setItem('large', new Array(5 * 1025 * 1025).fill('a').join(''));

lls.getItem('large');

lls.removeItem('string');

lls.clear();

License

MIT@hustcc.