reset-storage

1.0.2 • Public • Published

reset-storage

NPM version Travis-CI Status Daviddm Status

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

changelog.md.

License

MIT © sanemat

Package Sidebar

Install

npm i reset-storage

Weekly Downloads

26

Version

1.0.2

License

MIT

Last publish

Collaborators

  • sanemat