little miniLock library for ECMAScript