JSPM

  • Created
  • Published
  • Downloads 39
  • Score
    100M100P100Q55145F
  • License MIT

Checks if array ends with a suffix.

Package Exports

  • @extra-array/is-suffix-on

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-suffix-on) 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 ends with a suffix. 🏃 📼 📦 🌔

Alternatives: compare, map.
Similar: suffix, suffixes, isSuffix.
This is part of package extra-array.

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

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

array.isSuffixOn(x, [-3, -4]);
// false

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

references