2.5.22 • Published 4 years ago
@extra-iterable/has-suffix.min v2.5.22
Checks if iterable ends with a suffix. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Alternatives: hasValue, hasPrefix, hasInfix, hasSuffix, hasSubsequence, hasPath.
This is part of package extra-iterable.
This is browserified, minified version of @extra-iterable/has-suffix. It is exported as global variable iterable_hasSuffix. CDN: unpkg, jsDelivr.
iterable.hasSuffix(x, y, fc, [fm]);
// x: an iterable
// y: suffix?
// fc: compare function (a, b)
// fm: map function (v, i, x)
const iterable = require("extra-iterable");
var x = [1, 2, 3, 4];
iterable.hasSuffix(x, [3, 4]);
// true
iterable.hasSuffix(x, [-3, -4]);
// false
iterable.hasSuffix(x, [-3, -4], (a, b) => Math.abs(a) - Math.abs(b));
// true
iterable.hasSuffix(x, [-3, -4], null, v => Math.abs(v));
// true
References
2.5.22
4 years ago
2.5.21
4 years ago
2.5.20
4 years ago
2.5.18
4 years ago
2.5.17
4 years ago
2.5.14
5 years ago
2.5.13
5 years ago
2.5.12
5 years ago
2.5.8
5 years ago
2.5.7
5 years ago
2.5.9
5 years ago
2.5.10
5 years ago
2.5.11
5 years ago
2.5.6
5 years ago
2.5.5
5 years ago
2.5.4
5 years ago
2.5.3
5 years ago
2.5.2
5 years ago
2.5.1
5 years ago