# permutation-parity

> Computes the parity of a permutation

Latest version **1.0.0** (published 2014-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install permutation-parity
pnpm add permutation-parity
yarn add permutation-parity
bun add permutation-parity
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-04-30 |
| First published | 2014-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | permutation, parity, sign, even, odd, alternating, sgn, levi-civita |

## Links

- npm: https://www.npmjs.com/package/permutation-parity
- Repository: https://github.com/mikolalysenko/permutation-parity
- Issues: https://github.com/mikolalysenko/permutation-parity/issues
- npm.io page: https://npm.io/package/permutation-parity

## Dependencies (1)

- [typedarray-pool](https://npm.io/package/typedarray-pool.md) ^1.0.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-04-30
- 0.0.2 — 2014-04-09
- 0.0.1 — 2014-04-08
- 0.0.0 — 2014-04-08

## README

permutation-parity
==================
Computes the [parity of a permutation](http://en.wikipedia.org/wiki/Parity_of_a_permutation).

# Example

```javascript
var sgn = require("permutation-parity")

console.log(sgn([0, 1, 2]), sgn([0, 2, 1]))
```

# Install

```
npm install permutation-parity
```

# API

#### `require("permutation-parity")(p)`
Determines the sign of a permutation

* `p` is a permutation

**Returns** The sign of the permutation:

* `1` if `p` is odd
* `-1` if `p` is even
* `0` if `p` is not a permutation

# Credits
(c) 2014 Mikola Lysenko. MIT License

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