deno.land / x / fuse@v6.4.1 / src / core / register.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { BitapSearch } from '../search'
const registeredSearchers = []
export default function register(...args) { registeredSearchers.push(...args)}
export function createSearcher(pattern, options) { for (let i = 0, len = registeredSearchers.length; i < len; i += 1) { let searcherClass = registeredSearchers[i] if (searcherClass.condition(pattern, options)) { return new searcherClass(pattern, options) } }
return new BitapSearch(pattern, options)}
fuse

Version Info

Tagged at
3 years ago