@wylau/localstorage
v0.1.1
Published
A simple local storage wrapper
Readme
A simple local storage wrapper
Install
npm install @wylau/localstorageUsage
import ls from "@wylau/localstorage";
ls.set('hello', 'world!');
ls.set('data', {name: 'Le Sserafim', members: ['Chaewon', 'Sakura', 'Yunjin', 'Kazuha', 'Eunchae']});
console.log(ls.get('hello')); //=> 'world!'
console.log(ls.count()) //=> 2
console.log(ls.getAll()) //=> [
// {key: 'hello', value: 'world!'},
// {key: 'data', value: {name: 'Le Sserafim', members: ['Chaewon', 'Sakura', 'Yunjin', 'Kazuha', 'Eunchae']}}
// ]
ls.clear();
console.log(ls.count()) //=> 0Author
👤 @wylau0
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator
