indices-for-same-value

5.0.0 • Public • Published

Indices for same value

Get all the indices for a given value in an array.

    npm i -S indices-for-same-value
    const getAllIndices = require('indices-for-same-value').getAllIndices

    getAllIndices(10, [10, 2, 3, 4, 5, 6, 7, 10, 10 ,10])
    // returns
    // ["0", "7", "8", "9"]

Testing

jasmine

License

MIT © Git Faf 2017

/indices-for-same-value/

    Package Sidebar

    Install

    npm i indices-for-same-value

    Weekly Downloads

    3

    Version

    5.0.0

    License

    MIT

    Last publish

    Collaborators

    • git.faf