Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin functionality #81

Closed
krisk opened this issue Mar 2, 2016 · 3 comments
Closed

Add plugin functionality #81

krisk opened this issue Mar 2, 2016 · 3 comments

Comments

@krisk
Copy link
Owner

krisk commented Mar 2, 2016

There have been many requests for features and/or enhancements to the library. Some of them are outside the scope or intent of Fuse. Others, however, are in a good position to be included. I'm thinking instead of modifying the core code, we could add extensible pieces to the library - essentially a plugin functionality.

Instead of forcing my vision, I'm interested into what everyone else thinks on how the API should look like.

Tell me your thoughts 😄

@Abhinav1217
Copy link

A standard chaining pattern is quite popular in Javascript world, because of Jquery.

fuse = new Fuse(arr); 
result = fuse.search(Key).sort("Dec");

Or as a PHP developer, I could also prefer something like this.

fuse = new Fuse(arr);
fuse.extend(new SortedFuse());

or like in PDO based plugins ( I don't think it would suit JS apps. but it is easier to implement ).

fuse = new Fuse(arr);
sortfuse = new SortefFuse(fuse);

@shri3k
Copy link

shri3k commented Aug 9, 2016

A standard chaining pattern is quite popular in Javascript world, because of Jquery.

That's all good for core extensibility but not for third party plugins as it will soon cause namespace conflicts. I would like to have something like pipe in unix since fuse mostly handles the data it would make sense to have .pipe (this can be confusing to node's pipe but just an example) or something in that realm.

.plugin actually doesn't sound bad but I'm bad with naming so it might actually sound bad for others.

@github-actions
Copy link

github-actions bot commented Apr 3, 2020

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Apr 3, 2020
@github-actions github-actions bot closed this as completed Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants