icicle

Can freeze and unfreeze on any object. Tiny mutex.

  • icicle

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
icicle
000.1.39 years ago10 years agoMinified + gzip package size for icicle in KB

Readme

❄ Icicle Build Status Code Climate
Tiny mutex.
$ npm install icicle
var icicle = require('icicle');

var a = {};

icicle.freeze(a, 'waitABit'); // true - lock is set
icicle.freeze(a, 'waitABit'); // false - lock is already set

icicle.isFrozen(a, 'waitABit'); // true

icicle.unfreeze(a, 'waitABit'); // true - lock is unset
icicle.unfreeze(a, 'waitABit'); // false - lock isn’t set

icicle.isFrozen(a, 'waitABit'); // false

NPM