json-parser
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "json-parser", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "JSON parser to parse JSON object and MAINTAIN comments.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -105,10 +105,27 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-json-parser.svg?branch=master)](https://travis-ci.org/kaelzhang/node-json-parser) | ||
- `Symbol.for('before-all')` comment tokens before the JSON object | ||
- `Symbol.for('before')` comment tokens before any properties/items inside an object/array | ||
- `Symbol.for(\`after-prop:${prop}\`)` comment tokens after property key `prop` and before colon(`:`) | ||
- `Symbol.for(\`after-colon:${prop}\`)` comment tokens after the colon(`:`) of property `prop` and before property value | ||
- `Symbol.for(\`after-value:${prop}\`)` comment tokens after the value of property `prop`/the item of index `prop` and before the key-value/item delimiter(`,`) | ||
- `Symbol.for(\`after-comma:${prop}\`)` comment tokens after the comma of `prop`-value pair and before the next key-value pair/item | ||
- `Symbol.for('after-all')` comment tokens after the JSON object | ||
```js | ||
// comment tokens before the JSON object | ||
Symbol.for('before-all') | ||
// comment tokens before any properties/items inside an object/array | ||
Symbol.for('before') | ||
// comment tokens after property key `prop` and before colon(`:`) | ||
Symbol.for(`after-prop:${prop}`) | ||
// comment tokens after the colon(`:`) of property `prop` and before property value | ||
Symbol.for(`after-colon:${prop}`) | ||
// comment tokens after the value of property `prop`/the item of index `prop` | ||
// and before the key-value/item delimiter(`,`) | ||
Symbol.for(`after-value:${prop}`) | ||
// comment tokens after the comma of `prop`-value pair | ||
// and before the next key-value pair/item | ||
Symbol.for(`after-comma:${prop}`) | ||
// comment tokens after the JSON object | ||
Symbol.for('after-all') | ||
``` | ||
And the value of each symbol property is an **array** of `CommentToken` | ||
@@ -115,0 +132,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12712
226
0