Skip to content

About

LocalStorage which can be set expires.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

next-local-expires

LocalStorage which can be set expires.

version license size download

installation

npm install -S @jswork/next-local-expires

apis

api params description
set inKey, inValue, inExpires set value with expires (ms)
get - get the right value if is in time, or will get null

usage

import NxLocalExpires from '@jswork/next-local-expires';

// code goes here:
const store = new NxLocalExpires();
store.set('login',{ token: 'YWRmajEyMzMx' }, 5*24*60*60*1000)
store.get('login');
// { token: 'YWRmajEyMzMx' }

license

Code released under the MIT license.

About

LocalStorage which can be set expires.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages