fuzzy-array-filter
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "fuzzy-array-filter", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A simple fuzzy array prototype filter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# fuzzy-array-filter | ||
[![npm version](https://badge.fury.io/js/fuzzy-array-filter.svg)](https://badge.fury.io/js/fuzzy-array-filter) | ||
A simple fuzzy filter function for [`array.prototype.filter`](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array/filter) using [fuse.js](http://fusejs.io/). | ||
## Install | ||
```sh | ||
npm i -S fuzzy-array-filter | ||
``` | ||
## How to use it : Simple | ||
@@ -9,3 +17,3 @@ | ||
use this wrapper with simple array `[val1, val2, ...]` il really (really) easy : | ||
use this wrapper with simple array `[val1, val2, ...]` il is really (really) easy : | ||
@@ -70,8 +78,8 @@ ```JavaScript | ||
## How to use it : More complex | ||
## How to use it : More complex data structures | ||
### Basics | ||
When you use this wrapper with more complex data, make sure you have custom options. | ||
you *MUST* fill the `id` and the `keys` options *AND* `id` *MUST* be one of the `keys` values. | ||
When you use this wrapper with more complex data structure, make sure you have provided some custom options. | ||
You **MUST** fill the `id` and the `keys` options **AND** `id` **MUST** be one of the `keys` values. | ||
@@ -174,2 +182,2 @@ In most of use cases `keys = [id, [whatever]]`. | ||
* An idea ? | ||
* Any idea ? |
17505
181