npm

Need private packages and team management tools?Check out npm Orgs. »

storage-mock

1.0.3 • Public • Published

storage-mock Build Status

Web Storage API Mock with events support

Install

$ npm install --save storage-mock

Usage

const mockedWindow = require('storage-mock');
 
mockedWindow.addEventListener('storage', e => {
  e.key // item-key
  e.oldValue // null
  e.newValue // item-value
});
 
mockedWindow.localStorage.setItem('item-key', 'item-value');

License

MIT © Eugene Datsky

install

npm i storage-mock

Downloadsweekly downloads

259

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability