kentcdodds / match-sorter

Simple, expected, and deterministic best-match sorting of an array in JavaScript
https://npm.im/match-sorter
MIT License
3.73k stars 129 forks source link

Feature request: export `match` and `sort` functions #142

Open vixalien opened 1 year ago

vixalien commented 1 year ago

I know this is a very far edge case, but I'm trying to use this with a certain UI library that is very opinionated. long story short, I set a FilterFunc and SortFunc on a certain structure that will be used to sort and filter the list.

It would be nice to have filter and sort functions that return whether data should be in the list or not and sort which compares two rows to check order