@extra-array/find-indices.min
    TypeScript icon, indicating that this package has built-in type declarations

    2.9.12 • Public • Published

    Finds indices of values passing a test. 🏃 📼 📦 🌔 📒

    Alternatives: findIndex, findIndices.
    Similar: find, findIndex.
    This is part of package extra-array.

    This is browserified, minified version of @extra-array/find-indices.
    It is exported as global variable array_findIndices.
    CDN: unpkg, jsDelivr.

    array.findIndices(x, fn);
    // x:  an array
    // fn: test function (v, i, x)
    const array = require('extra-array');
     
    var x = [1, 2, 3, 4, 5];
    array.findIndices(x, v => v % 2 == 0);
    // [ 1, 3 ] ^     ^
     
    array.findIndices(x, v => v % 2 == 1);
    // [ 0, 2, 4 ] ^     ^

    references

    Install

    npm i @extra-array/find-indices.min

    DownloadsWeekly Downloads

    776

    Version

    2.9.12

    License

    MIT

    Unpacked Size

    7.64 kB

    Total Files

    14

    Last publish

    Collaborators

    • wolfram77