paleite / lockfile

Simple utility to lock and unlock lockfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lockfile

Simple utility to lock and unlock lockfiles

import Lockfile from '@paleite/lockfile'
const lf = new Lockfile(__filename)
lf
  .lock()
  .then(() => {
    // ... your code
    lf.unlock()
  })
  .catch(e => {
    console.error(e)
  })

About

Simple utility to lock and unlock lockfiles

License:MIT License


Languages

Language:JavaScript 100.0%