Package Exports
- @extra-array/is-subsequence
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@extra-array/is-subsequence) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Checks if array has a subsequence.
This is part of package extra-array.
array.isSubsequence(x, y, [fn]);
// x: an array
// y: subsequence?
// fn: compare function (a, b)
// --> true if subsequenceconst array = require('extra-array');
var x = [1, 2, 3, 4];
array.isSubsequence(x, [2, 4]);
// true
array.isSubsequence(x, [-2, -4]);
// false
array.isSubsequence(x, [-2, -4], (a, b) => Math.abs(a) - Math.abs(b));
// true