Skip to content

Commit

Permalink
doc: update CHANGELOG.md for v2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR committed Aug 1, 2024
1 parent d2e996d commit ff9126d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## v2.5.0

- Accept `Array#sort(comparator)` comparator method as deterministic option value to use that comparator for sorting object keys.

```js
import { configure } from 'safe-stable-stringify'

const object = {
a: 1,
b: 2,
c: 3,
}

const stringify = configure({
deterministic: (a, b) => b.localeCompare(a)
})

stringify(object)
// '{"c": 3,"b":2,"a":1}'
```

- Very minor performance optimization.

Thanks to @flobernd, @cesco69 and @prisis to contribute to this release!

## v2.4.3

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

0 comments on commit ff9126d

Please sign in to comment.