Ninety Percent Muffin

    lagden-find

    2.0.2 • Public • Published

    Encontre

    Build Status Coverage Status Dependency Status devDependency Status XO code style

    Just find

    Install

    $ npm i -S lagden-find
    

    Usage

    const encontre = require('lagden-find')
    const collection = [{name: 'Sabrina', age: 27}, {name: 'Lagden', age: 28}]
    
    const r = encontre(collection, 'name', 'sa', {caseSensitive: false})
    console.log(r) // [{name: 'Sabrina', age: 27}]

    API

    encontre(collection, k, q, options)

    parameter type required default description
    collection array yes - An array of objects - see example
    k string yes - The key of object which you would like to search
    q string yes - The term that you looking for
    options object no see below Options

    options

    Name Type Required Default Description
    split boolean no true Break the term in many words
    caseSensitive boolean no true The words can differ in meaning

    License

    MIT © Thiago Lagden

    Install

    npm i lagden-find

    DownloadsWeekly Downloads

    3

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    5.27 kB

    Total Files

    5

    Last publish

    Collaborators

    • lagden