Skip to content

Commit d57478d

Browse files
committed
4.5.1: README.md: typo
1 parent 6ce3761 commit d57478d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ const obj = parse(`// top comment
552552

553553
// Move top comment to bottom
554554
moveComments(obj, obj,
555-
{ kind: 'before-all' },
556-
{ kind: 'after-all' }
555+
{ where: 'before-all' },
556+
{ where: 'after-all' }
557557
)
558558

559559
console.log(stringify(obj, null, 2))
@@ -574,8 +574,8 @@ const target = { bar: 2 }
574574

575575
// Move comment from source to target
576576
moveComments(source, target,
577-
{ kind: 'after-value', key: 'foo' },
578-
{ kind: 'before', key: 'bar' }
577+
{ where: 'after-value', key: 'foo' },
578+
{ where: 'before', key: 'bar' }
579579
)
580580

581581
console.log(stringify(target, null, 2))
@@ -596,8 +596,8 @@ const obj = parse(`{
596596

597597
// By default, comments are appended (override = false)
598598
moveComments(obj, obj,
599-
{ kind: 'after-value', key: 'foo' },
600-
{ kind: 'before', key: 'foo' }
599+
{ where: 'after-value', key: 'foo' },
600+
{ where: 'before', key: 'foo' }
601601
)
602602

603603
console.log(stringify(obj, null, 2))
@@ -610,8 +610,8 @@ console.log(stringify(obj, null, 2))
610610

611611
// With override = true, existing comments are replaced
612612
moveComments(obj, obj,
613-
{ kind: 'before', key: 'bar' },
614-
{ kind: 'before', key: 'foo' },
613+
{ where: 'before', key: 'bar' },
614+
{ where: 'before', key: 'foo' },
615615
true // override existing comments
616616
)
617617
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "comment-json",
3-
"version": "4.5.0",
3+
"version": "4.5.1",
44
"description": "Parse and stringify JSON with comments. It will retain comments even after saved!",
55
"main": "src/index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)