From c02dfa5c8d5fa767c10e2c64460c461b74b45843 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Mon, 20 Apr 2020 09:26:18 +0200 Subject: [PATCH 1/2] chore(package): add engine prop --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 124438b6..a75f9ce7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,10 @@ { "name": "json-ast", "version": "2.1.7", + "engines": { + "node": "^4.9.1", + "npm": "^2.15.11" + }, "description": "JSON parser AST utilities", "author": "Romain Gaucher", "homepage": "https://github.com/neuroo/json-ast", From 045f221c0a2797693c4ef83ece7e0a5642d39369 Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Mon, 20 Apr 2020 09:26:41 +0200 Subject: [PATCH 2/2] docs(README): fix exampe useage of visitor object --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13f5b351..1a3a5f52 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ const ast = parse(JSON_BUFFER, {verbose: true, junker: true}); assert(ast instanceof AST.JsonDocument); const visitor = new MyVisitor(); -ast.visit(visitor); +ast.accept(visitor); assert.deepEqual(visitor.comments, [" Some comment"]); // One can also the `JsonNode.toJSON` static method to convert to a JavaScript object