fuzzysort
fuzzysort copied to clipboard
Deno/ESM support
This is gonna be a quick one: I'm using Deno (version 1.19.2), and couldn't import the fuzzysort.js
file as a module. One quick hack with the file (and by that, I mean I removed the UMD function, and added an export const fuzzysort
declaration ) later, and it looked like the problem was (somewhat) resolved.
Of course, the hack I did was complete crap - But it could be a step in the right direction. Is proper support for ESM imports a possibility? Or is there something I'm missing, here?
That is what I had to do too to get it loading using plain import
. Remove UMD-wrapper and do export const fuzzysort = fuzzysortNew();
Don't think it's "crap", it's standard., but agree should be possible to get it to handle both UMD and import somehow I think.
Yes please! A build like ... at fuse.js .... to target different module patterns would be nice. Otherwise just go for esm? As this is and will be the way to go anyway on any js runtime.