# windows-mutex

> Expose the Windows CreateMutex API to Node.JS

Latest version **0.4.1** (published 2019-12-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install windows-mutex
pnpm add windows-mutex
yarn add windows-mutex
bun add windows-mutex
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2019-12-12 |
| First published | 2015-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/windows-mutex) |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 35 |
| Author | Microsoft |
| Maintainers | bpasero, joaomoreno.ms, microsoft |

## Links

- npm: https://www.npmjs.com/package/windows-mutex
- Repository: https://github.com/Microsoft/node-windows-mutex
- Issues: https://github.com/Microsoft/node-windows-mutex/issues
- npm.io page: https://npm.io/package/windows-mutex

## Dependencies (2)

- [nan](https://npm.io/package/nan.md) ^2.14.0
- [bindings](https://npm.io/package/bindings.md) ^1.2.1

## Recent versions

- 0.4.1 (latest) — 2019-12-12
- 0.4.0 — 2019-11-08
- 0.3.0 — 2019-07-18
- 0.2.1 — 2018-10-17
- 0.2.0 — 2015-12-01
- 0.1.4 — 2015-11-30
- 0.1.3 — 2015-11-30
- 0.1.2 — 2015-11-30
- 0.1.1 — 2015-11-30
- 0.1.0 — 2015-11-30

## README

# windows-mutex

[![Build Status](https://dev.azure.com/vscode/node-windows-mutex/_apis/build/status/microsoft.node-windows-mutex?branchName=master)](https://dev.azure.com/vscode/node-windows-mutex/_build/latest?definitionId=23&branchName=master)

Expose the Windows CreateMutex API to Node.JS.

## Installation

`windows-mutex` will only compile in Windows machines, so it is advisable
to use the `--save-optional` flag and wrap the
`require('windows-mutex')` call in a `try {} catch {}` block, in case your
code also runs on other platforms.

```
npm install --save-optional windows-mutex
```

## Usage

```javascript
import { Mutex } from 'windows-mutex';

var mutex = new Mutex('my-mutex');
console.log(mutex.isActive());
mutex.release();
```

## Development

Publishing to NPM is automated via CI. As soon as a tag is pushed to the repo, that version will be built and published to NPM.

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