2.0.2 • Published 4 years ago

lagden-find v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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)

parametertyperequireddefaultdescription
collectionarrayyes-An array of objects - see example
kstringyes-The key of object which you would like to search
qstringyes-The term that you looking for
optionsobjectnosee belowOptions

options

NameTypeRequiredDefaultDescription
splitbooleannotrueBreak the term in many words
caseSensitivebooleannotrueThe words can differ in meaning

License

MIT © Thiago Lagden

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

7 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago