Skip to content

Commit 0713e80

Browse files
authored
Merge pull request #22: v2.1.0
2 parents 915bf7a + 6e295ff commit 0713e80

File tree

8 files changed

+578
-113
lines changed

8 files changed

+578
-113
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Changelog
22

3-
## v2.0.1
3+
## v2.1.0
44

5+
- Added `maximumBreadth` option to limit stringification at a specific object or array "width" (number of properties / values)
6+
- Added `maximumDepth` option to limit stringification at a specific nesting depth
7+
- Implemented the [well formed stringify proposal](https://github.com/tc39/proposal-well-formed-stringify) that is now part of the spec
58
- Fixed maximum spacer length (10)
69
- Fixed TypeScript definition
10+
- Fixed duplicated array replacer values serialized more than once
711

812
## v2.0.0
913

benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const Benchmark = require('benchmark')
44
const suite = new Benchmark.Suite()
5-
const stringify = require('.')
5+
const stringify = require('.').configure({ deterministic: true })
66

77
// eslint-disable-next-line
88
const array = Array({ length: 10 }, (_, i) => i)

index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export interface StringifyOptions {
55
bigint?: boolean,
66
circularValue?: string | null,
77
deterministic?: boolean,
8+
maximumBreadth?: number,
9+
maximumDepth?: number,
810
}
911

1012
export namespace stringify {

0 commit comments

Comments
 (0)