@extra-array/is-infix-on
TypeScript icon, indicating that this package has built-in type declarations

2.7.8 • Public • Published

Checks if array contains an infix. 🏃 📼 📦 🌔

Alternatives: compare, map.
Similar: infix, infixes, isInfix.
This is part of package extra-array.

array.isInfixOn(x, y, [fn], [ths]);
// x:   an array
// y:   infix?
// fn:  map function (v, i, x)
// ths: this argument
const array = require('extra-array');

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

array.isInfixOn(x, [-2, -3]);
// false

array.isInfixOn(x, [-2, -3], v => Math.abs(v));
// true

references

Package Sidebar

Install

npm i @extra-array/is-infix-on

Weekly Downloads

0

Version

2.7.8

License

MIT

Unpacked Size

8.46 kB

Total Files

19

Last publish

Collaborators

  • wolfram77