Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for caseSensitive option. #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Browser:

## Use it

Padawan: Simply filter an array of strings.
Initiate: Simply filter an array of strings.

```javascript
var list = ['baconing', 'narwhal', 'a mighty bear canoe'];
Expand All @@ -45,6 +45,23 @@ console.log(matches);
// [ 'baconing', 'a mighty bear canoe' ]
```

Padawan: Match case-sensitive strings (defaults to `false`)

```javascript
var list = ['baconing', 'narwhal', 'a Mighty Bear canoe'];
var options = { caseSensitive: true };
var results_lower = fuzzy.filter('bcn', list, options)
console.log(results_lower);
// [
// {string: '<b>a<c>o<n>ing' , index: 0, score: 3, original: 'baconing'},
// ]
var results_upper = fuzzy.filter('Bcn', list, options)
console.log(results_upper);
// [
// {string: 'a mighty <B>ear <c>a<n>oe', index: 2, score: 3, original: 'a Mighty Bear canoe'}
// ]
```

Jedi: Wrap matching characters in each string

```javascript
Expand Down