🛠️ Create custom utilityusing Fuse.js for efficient SVG title searching

This commit is contained in:
pheralb
2025-08-27 14:36:08 +01:00
parent da19647abf
commit 78cccd21e9
+12
View File
@@ -0,0 +1,12 @@
import type { iSVG } from "@/types/svg";
import Fuse from "fuse.js";
export const searchWithFuse = (svgsData: iSVG[]) => {
return new Fuse<iSVG>(svgsData, {
keys: ["title"],
threshold: 0.35,
ignoreLocation: true,
isCaseSensitive: false,
shouldSort: true,
});
};