itemsapi / itemsjs

Extremely fast faceted search engine in JavaScript - lightweight, flexible, and simple to use
Apache License 2.0
350 stars 41 forks source link

Allow for multiple sort criteria and custom sort #33

Closed carab closed 5 years ago

carab commented 5 years ago

Hello,

I made some changes to allow a multiple criteria sort, as is allowed by _.orderBy. I've also added the possibility to use a custom sort which was not defined in the configuration, in case the sort criteria are built on the fly.

I added tests and updated docs, please let me know if I need to do anything more !

Thank you.

cigolpl commented 5 years ago

Hey @carab it's a great idea and it looks good to me! I've left one comment there

cigolpl commented 5 years ago

Merged and deployed to https://www.npmjs.com/package/itemsjs as itemsjs@1.0.42

carab commented 5 years ago

Thanks !