Distributed locking via MySQL or PostgreSQL advisory locks. Current stable version 5.0.0, released regularly on npm. Uses GET_LOCK() / pg_try_advisory_lock() to provide mutually exclusive locks across processes. Lightweight, dependency-agnostic (bring your own mysql2 or pg driver).
npm install mr-potato-headNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates acquiring and releasing an advisory lock using async/await with mysql2.
Use import or enable ESM in package.json.
Use distinct lock names per critical section.
Use async/await or .lock().then().
Update to v5 and use import syntax, or stay on <5 and use require().
Add dialect: 'mysql' or 'postgres' in options object.