1.0.7 • Published 11 months ago
localstorage_plug v1.0.7
插件作用
- 给Localstorage设置过期时间
使用方法
- npm install localstorage_plug
- import {Storage} from 'localstorage_plug'
const ls = new Storage()
ls.set('key',123,new Date().getTime() +5000)
setInterval(()=>{
console.log( ls.get('key'));
},1000)