Releases: snovakovic/fast-sort
3.4.0
3.3.3
Fix usage in TS environment with "moduleResolution": "node16"
3.3.0
Added proper support for ESM modules
3.2.1
defaultComparer
is now exported so it can be used for overriding of custom sort instances.
NOTE: This change was suppose to be available in 3.2.0 version but that version was published by mistake without including that changes.
3.1.0
Check CHANGELOG.md For more information's on changes between versions.
2.2.0
-
Fix exported interface names by renaming old
IComparer
toISortInstanceOptions
and creating newIComparer
interface that is now interface for actual comparer function. -
Apply TS interfaces to module internals
-
Smaller refactoring of code to make it even easier to follow and understand.
2.1.1
2.0.0
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')