@extra-array/search-value-all
@extra-array/search-value-all
npm i @extra-array/search-value-all
@extra-array/search-value-all

@extra-array/search-value-all

An array is a collection of values, stored contiguously.

by nodef

2.10.19 (see all)License:MITTypeScript:Not Found
npm i @extra-array/search-value-all
Readme

Finds indices of value. 📦 😺 🏃‍♂️ 📼 🌔 📜 📰 📘

Alternatives: searchValue, searchValueRight, searchValueAll.
Similar: search, scan, find.

This is part of package extra-array.


array.searchValueAll(x, v, [fc], [fm]);
// x:  an array
// v:  search value
// fc: compare function (a, b)
// fm: map function (v, i, x)
const array = require("extra-array");

var x = [1, 2, 3, 2, 5];
array.searchValueAll(x, 2);
// [ 1, 3 ] ^     ^

var x = [1, 2, 3, -2, 5];
array.searchValueAll(x, 2, (a, b) => Math.abs(a) - Math.abs(b));
// [ 1, 3 ] ^      ^

array.searchValueAll(x, 2, null, v => Math.abs(v));
// [ 1, 3 ] ^      ^


References

Downloads/wk

86

GitHub Stars

14

LAST COMMIT

7mos ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
2.10.19
latest
7mos ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate