0.0.1-alpha • Published 3 years ago
@art-of-coding/lockfile v0.0.1-alpha
Lockfile
A small lockfile utility.
Any other instances trying to acquire the lock will fail until the lock has been released.
Install
This is an alpha veraion. Input is appreciated!
npm i @art-of-coding/lockfile
Example
import acquireLock from '@art-of-coding/lockfile'
// Acquire the lock
const release = await acquireLock('path/to/some/file.txt')
// do some work...
// and then release the lock
await release()
License
Copyright 2021 Michiel van der Velde.
This software is licensed under the MIT License.
0.0.1-alpha
3 years ago