Skip to content

opensrcken/LockableStorage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About this fork

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']
});

Packages

 
 
 

Languages

  • JavaScript 100.0%