lockable-storage-opensrcken

1.0.2 • Public • Published

HTML5 Lockable Storage

Manage concurrency between browser tabs running independent processes by (a)synchronizing the localStorage resource.

This is the implementation by Benjamin Dumke-von der Ehe as posted in his 2012 article JavaScript concurrency and locking the HTML5 localStorage.

Install

bower install lockablestorage

or

  npm install lockable-storage

Usage

import createLocker from 'lockable-storage';
import store from 'store';

const locker = createLockableStorage(store);
locker.lock('key', function () {
    // exclusive access to localStorage['key']
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    3
  • 1.0.0
    1
  • 1.1.0
    1

Package Sidebar

Install

npm i lockable-storage-opensrcken

Weekly Downloads

5

Version

1.0.2

License

Copyright (c) 2012 (see LICENSE)

Last publish

Collaborators

  • bbken