Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

icicle

dfcreative3kunlicense0.1.3

Can freeze and unfreeze on any object. Tiny mutex.

mutex, lock, freeze, latch

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