Comparing version 1.0.0 to 1.0.1
@@ -85,9 +85,4 @@ import lexer from 'json-lexer'; | ||
let whitespaceAfterChildren; | ||
// const node: Omit< CstNodeObject, 'range' > = { | ||
// kind: 'object', | ||
// children: [ ], | ||
// whitespaceAfterChildren: undefined, | ||
// }; | ||
let i = pos; | ||
for (; i < tokens.length; ++i) { | ||
for (; i < tokens.length;) { | ||
const propStartToken = tokens[i]; | ||
@@ -149,3 +144,3 @@ const firstToken = nextNonWhitespaceToken(tokens, i); | ||
let i = pos; | ||
for (; i < tokens.length; ++i) { | ||
for (; i < tokens.length;) { | ||
const elemStartToken = tokens[i]; | ||
@@ -152,0 +147,0 @@ const firstToken = nextNonWhitespaceToken(tokens, i); |
{ | ||
"name": "json-cst", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Parse JSON into CST (Concrete Syntax Tree)", | ||
@@ -5,0 +5,0 @@ "author": "Gustaf Räntilä", |
@@ -10,5 +10,7 @@ [![npm version][npm-image]][npm-url] | ||
This package parses a JSON into CST (Concrete Syntax Tree), similar to an AST but more low-level and with ties to the lexer tokens. It uses `json-lexer` to parse the file into tokens. The speed is practically the same as `json-to-ast` (it's ~10% faster than `json-to-ast`), but it's far smaller (even including `json-lexer`). | ||
This package parses a JSON into CST (Concrete Syntax Tree), similar to an AST but more low-level and with ties to the lexer tokens. It uses `json-lexer` to parse the file into tokens. The speed is practically the same as [`json-to-ast`](https://www.npmjs.com/package/json-to-ast) (it's ~10% faster than `json-to-ast`), but it's far smaller (even including `json-lexer`). Pure package is 7x smaller, install size 12x smaller, bundling it makes it 6x smaller according to bundlephobia ([json-to-ast](https://bundlephobia.com/package/json-to-ast@2.1.0) vs [json-cst](https://bundlephobia.com/package/json-cst@1.0.0)). | ||
It comes with TypeScript typings. | ||
# Install | ||
@@ -63,3 +65,3 @@ | ||
start: number; | ||
end: number; | ||
end: number; | ||
} | ||
@@ -66,0 +68,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
19387
87
353