1// This can be excluded when loaded via <script>import FuzzySearch from 'fuzzy-search'; // Or: var FuzzySearch = require('fuzzy-search'); const people = [{ name: { firstName: 'Jesse', lastName: 'Bowen', }, state: 'Seattle',}]; const searcher = new FuzzySearch(people, ['name.firstName', 'state'], { caseSensitive: true,});const result = searcher.search('ess');
1const options = {
2 includeScore: true,
3 // Search in `author` and in `tags` array
4 keys: ['author', 'tags']
5}
6
7const fuse = new Fuse(list, options)
8
9const result = fuse.search('tion')