We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2e996d commit ff9126dCopy full SHA for ff9126d
CHANGELOG.md
@@ -1,5 +1,30 @@
1
# Changelog
2
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
28
## v2.4.3
29
30
- Fixed toJSON function receiving array keys as number instead of string
0 commit comments