reset-storage
v1.0.2
Published
Reset storage. E.g. localStorage, indexedDB.
Downloads
22
Maintainers
Readme
reset-storage
Reset storage. E.g. localStorage, indexedDB.
reset-storage
based on mizchi/items/54f4b0f30990d48a135.
Install
$ npm install --save reset-storage
Usage
var resetStorage = require('reset-storage');
// or
<script src="build/reset-storage.js"></script>
resetStorage('want-to-delete');
//=> Reset localStorage && Reset 'want-to-delete' indexedDB
resetStorage.localStorage();
//=> Reset localStorage
resetStorage.indexedDB('want-to-delete');
//=> Reset 'want-to-delete' indexedDB
API
resetStorage(database[, database2, ...]) -> Promise
Reset a localStorage & an indexedDB.
database
Required
Type: string
Database name on indexedDB.
resetStorage.all(database[, database2, ...]) -> Promise
Same as resetStorage()
resetStorage.localStorage() -> Promise
Reset a localStorage.
resetStorage.indexedDB(database[, database2, ...]) -> Promise
Reset an indexedDB.
database
Required
Type: string
Database name on indexedDB.
Changelog
License
MIT © sanemat