comment-json
Advanced tools
Comparing version 2.2.0 to 2.3.0
{ | ||
"name": "comment-json", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Parse and stringify JSON with comments. It will retain comments even after saved!", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -212,3 +212,19 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-comment-json.svg?branch=master)](https://travis-ci.org/kaelzhang/node-comment-json) | ||
inline: boolean | ||
// But pay attention that, | ||
// locations will NOT be maintained when stringified | ||
loc: CommentLocation | ||
} | ||
interface CommentLocation { | ||
// The start location begins at the `//` or `/*` symbol | ||
start: Location | ||
// The end location of multi-line comment ends at the `*/` symbol | ||
end: Location | ||
} | ||
interface Location { | ||
line: number | ||
column: number | ||
} | ||
``` | ||
@@ -215,0 +231,0 @@ |
@@ -162,3 +162,3 @@ // JSON formatting | ||
delete comment.loc | ||
// delete comment.loc | ||
comments.push(comment) | ||
@@ -165,0 +165,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
34394
440