Checks if array has a value.
npm install @extra-array/is-value.minChecks if array has a value. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:]
> Similar: [value], [values], [isValue], [searchValue].
> Similar: [isValue], [isPrefix], [isInfix], [isSuffix], [isSubsequence], [isPermutation].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
> This is browserified, minified version of [@extra-array/is-value].
> It is exported as global variable array_isValue.
> CDN: [unpkg], [jsDelivr].
[@extra-array/is-value]: https://www.npmjs.com/package/@extra-array/is-value
[unpkg]: https://unpkg.com/@extra-array/is-value.min
[jsDelivr]: https://cdn.jsdelivr.net/npm/@extra-array/is-value.min
``javascript`
array.isValue(x, v, [fc], [fm]);
// x: an array
// v: value?
// fc: compare function (a, b)
// fm: map function (v, i, x)
`javascript
const array = require('extra-array');
var x = [1, 2, -3];
array.isValue(x, 3);
// false
array.isValue(x, 3, (a, b) => Math.abs(a) - Math.abs(b));
// true
array.isValue(x, 3, null, v => Math.abs(v));
// true
``
- Array.prototype.includes: MDN web docs
- array-tools.contains: @75lb
[:running:]: https://npm.runkit.com/@extra-array/is-value
[:package:]: https://www.npmjs.com/package/@extra-array/is-value
[:moon:]: https://www.npmjs.com/package/@extra-array/is-value.min
[value]: https://github.com/nodef/extra-array/wiki/value
[values]: https://github.com/nodef/extra-array/wiki/values
[isValue]: https://github.com/nodef/extra-array/wiki/isValue
[:ledger:]: https://unpkg.com/@extra-array/is-value/
[:vhs:]: https://asciinema.org/a/332085
[searchValue]: https://github.com/nodef/extra-array/wiki/searchValue
[isPrefix]: https://github.com/nodef/extra-array/wiki/isPrefix
[isInfix]: https://github.com/nodef/extra-array/wiki/isInfix
[isSuffix]: https://github.com/nodef/extra-array/wiki/isSuffix
[isSubsequence]: https://github.com/nodef/extra-array/wiki/isSubsequence
[isPermutation]: https://github.com/nodef/extra-array/wiki/isPermutation