Skip to content

Commit ff9126d

Browse files
author
Ruben Bridgewater
committed
doc: update CHANGELOG.md for v2.5.0
1 parent d2e996d commit ff9126d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## v2.5.0
4+
5+
- Accept `Array#sort(comparator)` comparator method as deterministic option value to use that comparator for sorting object keys.
6+
7+
```js
8+
import { configure } from 'safe-stable-stringify'
9+
10+
const object = {
11+
a: 1,
12+
b: 2,
13+
c: 3,
14+
}
15+
16+
const stringify = configure({
17+
deterministic: (a, b) => b.localeCompare(a)
18+
})
19+
20+
stringify(object)
21+
// '{"c": 3,"b":2,"a":1}'
22+
```
23+
24+
- Very minor performance optimization.
25+
26+
Thanks to @flobernd, @cesco69 and @prisis to contribute to this release!
27+
328
## v2.4.3
429

530
- Fixed toJSON function receiving array keys as number instead of string

0 commit comments

Comments
 (0)