FuzzySetObject
A simple upgrade to fuzzyset.js to allow usage of objects instead of strings only.
Install
npm i fuzzyset-obj
General Usage Information
When using this library, you can either create a FuzzySetContainer
that contains strings, or objects, but not both. All arguments will take both.
Usage (JavaScript)
; const fuzzySet = ; // add an item to the setfuzzySet;fuzzySet;fuzzySet; // search the set for one itemconst res = fuzzySet; // returns 'Test' // search the set for multiple items, getting them in descending orderconst res = fuzzySet // returns ['Apples are great', 'Bananas are great']
Usage (TypeScript)
; ; // add an item to the setfuzzySet.add;fuzzySet.add; // search the set for one item; // returns { fruit: 'Banana' } // search the set for multiple items, getting them in descending order; // returns [{ fruit: 'Banana' }, { fruit: 'Blueberry' }]
Contributing
Feel free to contribute features by sending a pull request.