krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
18.05k stars 766 forks source link

docs(install): add usage with require and import #459

Closed vvo closed 4 years ago

vvo commented 4 years ago

Hi there!

While it may seem obvious that the way to import/require the library is the way I added documentation for, it was not for me! (and maybe others, see https://github.com/krisk/Fuse/issues/209)

Especially because the first page after "Installation" is "Different builds". Different builds to me meant that maybe I had to use import Fuse from "fuse.js/basic" or import Fuse from "fuse.js/full" etc..

Side note: I believe it would be good to be able to do:

import Fuse from fuse.js/basic
import Fuse from fuse.js/full

Thanks!

krisk commented 4 years ago

Updated in docs.