Ejemplo 1: javascript de búsqueda difusa
// 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');
Ejemplo 2: búsqueda aproximada de JavaScript
const options = {
includeScore: true,
// Search in `author` and in `tags` array
keys: ['author', 'tags']
}
const fuse = new Fuse(list, options)
const result = fuse.search('tion')
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)