The only minimum async lock you need.
npm install minimum-lock

``sh`
npm install minimum-lock
This package does not have any dependencies.
`ts
import { Lock } from 'minimum-lock';
async function doSomethingWithLock(lock) {
const release = await lock.acquire();
doSomethingMustBeSequential();
release();
}
async function doSomething() {
...
const lock = new Lock();
doSomethingWithLock(lock);
doSomethingWithLock(lock);
}
`
⚠️ The acquire method returns a release callback, if you forget to call this release` callback, the lock is locked forever.