# fs-locker

> Simple locker according on File System.

Latest version **0.0.1** (published 2016-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install fs-locker
pnpm add fs-locker
yarn add fs-locker
bun add fs-locker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-09-21 |
| First published | 2016-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bill Xiong |
| Maintainers | haibxz |
| Keywords | lock, locker |

## Links

- npm: https://www.npmjs.com/package/fs-locker
- npm.io page: https://npm.io/package/fs-locker

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.16.1

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-09-21

## README

# node-fs-locker

Simple locker according on File System.

## Example

```js
var locker = Locker({
  path: '/tmp',
  name: 'test-locker.lock'
});

locker.acquire(function(err, release) {
  var handler = this;
  if (err) {
    return console.log('acquire lock failed.');
  }
  console.log('Bingo! Locked.');
  handler.release(function(err2) {
    if (err2) {
      return console.log('Ooops, release lock failed. ' + err2);
    }
    console.log('Lock released.');
  });
});
```

---
_Source: https://npm.io/package/fs-locker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
