Skip to content

pandawing/node-reset-storage

Repository files navigation

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

About

Reset storage. E.g. localStorage, indexedDB.

Resources

License

Stars

Watchers

Forks

Packages

No packages published