1.0.3 • Published 3 years ago

x-ls-cache v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
3 years ago

localstorage-cache

针对localstorage频繁取值的节流操作

npm

npm install --save x-ls-cache

demo

let StorageCache = require('x-ls-cache');
StorageCache.time=1000;
StorageCache.get('aaa',true)

api

get (key,isParseJson)

获取localStorage值,key为键值,isParseJson是否转为json对象。

time

配置多少毫秒内不作重复读取,默认为1000;

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago