Skip to content

Commit 8a4c699

Browse files
authored
Merge pull request #6 from BastiDood/allow-named-imports
feat: allow named imports
2 parents bcb55ea + b947340 commit 8a4c699

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ export type FuzzySearcher<T> = (string) => Array<FuzzyResult<T>>
9494
*
9595
* If you use React, use `useFuzzySearchList` hook for convenience.
9696
*/
97-
export default function createFuzzySearch<Element>(
97+
export function createFuzzySearch<Element>(
9898
list: Element[],
9999
options?: FuzzySearchOptions,
100100
): FuzzySearcher<Element>
101101

102+
export default createFuzzySearch
103+
102104
/**
103105
* Runs a one-off fuzzy search matching on `text` against `queryText`.
104106
*

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,15 @@ export type FuzzySearcher<T> = (string) => Array<FuzzyResult<T>>
9696
*
9797
* If you use React, use `useFuzzySearchList` hook for convenience.
9898
*/
99-
export default function createFuzzySearch<Element>(
99+
export function createFuzzySearch<Element>(
100100
list: Element[],
101101
options?: FuzzySearchOptions = ({}: any),
102102
): FuzzySearcher<Element> {
103103
return require('./impl').createFuzzySearchImpl(list, options)
104104
}
105105

106+
export default createFuzzySearch
107+
106108
/**
107109
* Runs a one-off fuzzy search matching on `text` against `queryText`.
108110
*

0 commit comments

Comments
 (0)