@amphibian/find

1.0.0 • Public • Published

find

build status

matches items in an array or object that return true in the finding function

npm install @amphibian/find
var find = require('@amphibian/find');
var array = ['zero', 'one', 'two', 'three', 'four'];

find(array, (index, i) => i === 2); // > 'two'

var object = {
    zero: {hello: true},
    one: {hello: false},
    two: {hello: true},
    three: {hello: false}
};

find(object, (key, value) => value.hello === true); // > {hello: true}

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @amphibian/find

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • thomaslindstr_m