Updates
- Source code have been moved from https://github.com/snovakovic/js-flock.
fast-sort
code originated as module in that repository and was just exported as single module in here. Now the source code have been moved to this repository - Sorce code rewrite (while keeping same API)
- ~20% faster then v1 (based on couple of benchmark runs on core i7 6th gen)
- Added option to create new sort instance with custom compares (e.g for creating native sort)
- Added TypeScript support
Breaking Changes
There is no beaking changes in API
-
Some invalid configs will now throw errors (that was previously silently ignored and produce unexpected results) as:
- Using string sytax for nested properties
sort(users).asc('address.city')
- Providing both asc and desc properties
sort(users).by({ asc: 'firstName', desc: 'firstName'})
- Using string sytax for nested properties
-
Updates to exported files. Below imports no longer exists
require('fast-sort/sort.es5')
should be updated to:require('fast-sort')
(es5 is now default export)require('fast-sort/sort.es5.min')
should be updated to:require('fast-sort/dist/sort.min')