2.3 KiB
2.3 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[3.3.3] - 2023-04-15
Fix usage in TS environment with "moduleResolution": "node16"
[3.3.0] - 2023-04-14
Added proper support for ESM modules
[3.2.1] - 2023-01-06
Added
defaultComparer
is now exported so it can be used for overriding of custom sort instances
[3.1.2] - 2021-11-10
Fixed
- Issue with sorting dates (https://github.com/snovakovic/fast-sort/issues/51)
[3.1.0] - 2021-11-10
Fixed
- TypeScript interface to allow sorting readonly arrays if inPlaceSorting is not used
[3.0.0] - 2021-04-08
Changed
- Default export has been replaced with named exports
import sort from 'fast-sort'; // older versions
import { sort } from 'fast-sort'; // v3 and up
-
By default
sort
no longer mutates array as was case in previous versions it now creates new array instance. -
sort.createNewInstance
is now provided as named export
import { createNewSortInstance } from 'fast-sort';
Added
inPlaceSort
mutates provided array instead of creating new array instance. This was default behaviour of previous sort versionsinPlaceSorting
option that can be passed tocreateNewSortInstance
.
[2.2.0] - 2019-12-14
[3.0.0] - 2021-04-08
Changed
- Old
IComparer
interface has been renamed toISortInstanceOptions
. NewIComparer
interface is created that now describes actual comparer function
[2.0.0] - 2019-12-14
Added
- Option to create new custom sort instance
const naturalSort = sort.createNewInstance({
comparer: new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }).compare,
});
- TypeScript support
- more info on this release on https://github.com/snovakovic/fast-sort/releases/tag/v2.0.0
[1.6.0]
Added
- Option to override default comparer in by sorter
sort(testArr).by({
desc: true,
comparer: new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }).compare,
});
[1.5.0]
Added
- Option to sort in multiple directions
sort(users).by([{ asc: 'age' }, { desc: 'firstName' }]);