Hooks
Functions
wildCardSearch
Wildcard search for array of object.
Example
import wildCardSearch from '@/utils/wildCardSearch'
const arr = [
{
name: 'Carolyn Perkins',
email: 'eileen_h@hotmail.com',
},
{
name: 'Terrance Moreno',
email: 'terrance_moreno@infotech.io',
},
{
name: 'Ron Vargas',
email: 'ronnie_vergas@infotech.io',
},
{
name: 'Luke Cook',
email: 'cookie_lukie@hotmail.com',
},
]
const data = wildCardSearch(arr, 'Terran')
// output: [
// {
// name: 'Terrance Moreno',
// email: 'terrance_moreno@infotech.io',
// },
// ]
Params
| param | Description | Type | Default |
|---|---|---|---|
| list | Array of object | Array<T> | - |
| input | Keyword | string | - |
Return
| return | Description | Type | Default |
|---|---|---|---|
| result | Result array | Array<T> | - |