Skip to content

glenngijsberts/CustomStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CustomStorage

Easy to use wrapper for localStorage API 🧠.

Install

# Install
npm install @glenngijsberts/customstorage --save
import CustomStorage from '@glenngijsberts/customstorage'

Usage

/*
    get item
*/
const token = CustomStorage.get('token')

/*
    set: token, value, cachetime
*/
const token = 'AABB12'
CustomStorage.set('token', token, 60)

/*
    remove item
*/
CustomStorage.remove('token')

/*
    clear storage (all items)
*/
CustomStorage.clear()

Clone

# clone the repo
git clone https://github.com/glenngijsberts/CustomStorage.git

# install dependencies / or npm install
yarn

# tests / or npm run test
yarn test

# build / or npm run prepare
yarn prepare

Contribution

Feel free to contribute to this package. If you have any questions you can reach out to me on twitter 😄 This package is inspired by this vue tabs package from the guys at spatie.

License

MIT

About

Easy to use wrapper for localStorage 🧠

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published