# @extra-array/has-permutation

> Checks if array has a permutation.

Latest version **2.10.19** (published 2022-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @extra-array/has-permutation
pnpm add @extra-array/has-permutation
yarn add @extra-array/has-permutation
bun add @extra-array/has-permutation
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.10.19 |
| Published | 2022-02-19 |
| First published | 2020-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | wolfram77@gmail.com |
| Maintainers | wolfram77 |
| Keywords | extra, array, has, permutation, hasPermutation |

## Links

- npm: https://www.npmjs.com/package/@extra-array/has-permutation
- Repository: https://github.com/nodef/extra-array
- Homepage: https://github.com/nodef/extra-array#readme
- Issues: https://github.com/nodef/extra-array/issues
- npm.io page: https://npm.io/package/@extra-array/has-permutation

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 2.10.19 (latest) — 2022-02-19
- 2.10.18 — 2021-04-13
- 2.10.17 — 2021-02-05
- 2.10.16 — 2021-02-03
- 2.10.15 — 2021-02-03
- 2.10.14 — 2021-02-02
- 2.10.13 — 2021-02-02
- 2.10.12 — 2021-02-02
- 2.10.11 — 2021-02-02
- 2.10.10 — 2021-02-02
- 2.10.9 — 2020-12-16
- 2.10.8 — 2020-09-14
- 2.10.7 — 2020-06-29
- 2.10.6 — 2020-06-28
- 2.10.5 — 2020-06-28
- … 3 more at https://npm.io/package/@extra-array/has-permutation/versions

## README

Checks if array has a permutation.
[:package:](https://www.npmjs.com/package/@extra-array/has-permutation)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/has-permutation)
[:vhs:](https://asciinema.org/a/343740)
[:moon:](https://www.npmjs.com/package/@extra-array/has-permutation.min)
[:scroll:](https://unpkg.com/@extra-array/has-permutation/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)

> Similar: [permutation], [permutations], [hasPermutation].<br>
> Similar: [hasValue], [hasPrefix], [hasInfix], [hasSuffix], [hasSubsequence], [hasPermutation], [hasPath].

> This is part of package [extra-array].

[extra-array]: https://www.npmjs.com/package/extra-array

<br>

```javascript
array.hasPermutation(x, y, [fc], [fm]);
// x:  an array
// y:  permutation?
// fc: map function (v, i, x)
// fm: compare function (a, b)
```

```javascript
const array = require("extra-array");

var x = [1, 2, 3, 4];
array.hasPermutation(x, [4, 3, 2, 1]);
// true

array.hasPermutation(x, [3, -1, -2, 4]);
// false

array.hasPermutation(x, [3, -1, -2, 4], (a, b) => Math.abs(a) - Math.abs(b));
// true

array.hasPermutation(x, [3, -1, -2, 4], null, v => Math.abs(v));
// true
```

<br>
<br>


## References

- [Data.List.permutations: Haskell](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:permutations)
- [List-Extra.isPermutationOf: elm](https://package.elm-lang.org/packages/elm-community/list-extra/7.1.0/List-Extra#isPermutationOf)

[permutation]: https://github.com/nodef/extra-array/wiki/permutation
[permutations]: https://github.com/nodef/extra-array/wiki/permutations
[hasPermutation]: https://github.com/nodef/extra-array/wiki/hasPermutation
[hasValue]: https://github.com/nodef/extra-array/wiki/hasValue
[hasPrefix]: https://github.com/nodef/extra-array/wiki/hasPrefix
[hasInfix]: https://github.com/nodef/extra-array/wiki/hasInfix
[hasSuffix]: https://github.com/nodef/extra-array/wiki/hasSuffix
[hasSubsequence]: https://github.com/nodef/extra-array/wiki/hasSubsequence
[hasPath]: https://github.com/nodef/extra-array/wiki/hasPath

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