Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/js-store
https://github.com/kanety/js-store
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/js-store
- Owner: kanety
- License: mit
- Created: 2019-06-15T11:29:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-22T10:33:28.000Z (over 5 years ago)
- Last Synced: 2024-12-25T04:04:44.247Z (23 days ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# js-store
A simple web storage wrapper saving json data.
## Installation
Install from npm:
$ npm install @kanety/js-store --save
## Usage
```javascript
import JsStore from '@kanety/js-store'let store = new JsStore({
type: 'session', // or 'local'
key: 'YOUR_STORAGE_KEY'
});// set
store.set({ key: 'value' });// get
let data = store.get();// remove
store.remove();
```## License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).