17 lines
387 B
Plaintext
17 lines
387 B
Plaintext
import { useMatch } from "./useMatch.js";
|
|
function useSearch(opts) {
|
|
return useMatch({
|
|
from: opts.from,
|
|
strict: opts.strict,
|
|
shouldThrow: opts.shouldThrow,
|
|
structuralSharing: opts.structuralSharing,
|
|
select: (match) => {
|
|
return opts.select ? opts.select(match.search) : match.search;
|
|
}
|
|
});
|
|
}
|
|
export {
|
|
useSearch
|
|
};
|
|
//# sourceMappingURL=useSearch.js.map
|