Skip to content

Repository files navigation

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

About

Web Storage API Mock with events support

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages