Checks if array has a value.
npm install @extra-array/is-value-on.minChecks if array has a value. [:running:] [:vhs:] [:package:] [:moon:]
> Alternatives: [compare], [map].
> Similar: [value], [values], [isValue].
> 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-on].
> It is exported as global variable array_isValueOn.
> CDN: [unpkg], [jsDelivr].
[@extra-array/is-value-on]: https://www.npmjs.com/package/@extra-array/is-value-on
[unpkg]: https://unpkg.com/@extra-array/is-value-on.min
[jsDelivr]: https://cdn.jsdelivr.net/npm/@extra-array/is-value-on.min
``javascript`
array.isValueOn(x, v, [fn], [ths]);
// x: an array
// v: value?
// fn: map function (v, i, x)
// ths: this argument
`javascript
const array = require('extra-array');
var x = [1, 2, 3, 4];
array.isValueOn(x, 3);
// true
array.isValueOn(x, -3);
// false
array.isValueOn(x, -3, v => Math.abs(v));
// true
``
- Array.prototype.includes: MDN web docs
[compare]: https://github.com/nodef/extra-array/wiki/isValue
[map]: https://github.com/nodef/extra-array/wiki/isValueOn
[:running:]: https://npm.runkit.com/@extra-array/is-value-on
[:vhs:]: https://asciinema.org/a/320031
[:package:]: https://www.npmjs.com/package/@extra-array/is-value-on
[:moon:]: https://www.npmjs.com/package/@extra-array/is-value-on.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