comment-json
Advanced tools
Comparing version 4.2.3 to 4.2.4
@@ -73,3 +73,3 @@ // Original from DefinitelyTyped. Thanks a million | ||
json: string, | ||
reviver?: Reviver, | ||
reviver?: Reviver | null, | ||
removesComments?: boolean | ||
@@ -76,0 +76,0 @@ ): CommentJSONValue |
{ | ||
"name": "comment-json", | ||
"version": "4.2.3", | ||
"version": "4.2.4", | ||
"description": "Parse and stringify JSON with comments. It will retain comments even after saved!", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,2 +0,2 @@ | ||
[![Build Status](https://travis-ci.org/kaelzhang/node-comment-json.svg?branch=master)](https://travis-ci.org/kaelzhang/node-comment-json) | ||
[![Build Status](https://github.com/kaelzhang/node-comment-json/actions/workflows/nodejs.yml/badge.svg)](https://github.com/kaelzhang/node-comment-json/actions/workflows/nodejs.yml) | ||
[![Coverage](https://codecov.io/gh/kaelzhang/node-comment-json/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/node-comment-json) | ||
@@ -95,3 +95,3 @@ [![npm module downloads per month](http://img.shields.io/npm/dm/comment-json.svg)](https://www.npmjs.org/package/comment-json) | ||
// b | ||
"b": 2 | ||
"b": 2, | ||
// a | ||
@@ -309,3 +309,3 @@ "a": 1 | ||
import { | ||
CommentDescriptor, CommentSymbol, parse | ||
CommentDescriptor, CommentSymbol, parse, CommentArray | ||
} from 'comment-json' | ||
@@ -315,5 +315,5 @@ | ||
// typescript only allows properly formatted symbol names here | ||
const symbolName: CommentDescriptor: 'before-prop:foo' | ||
const symbolName: CommentDescriptor = 'before:foo' | ||
console.log(parsed[Symbol.for(symbolName) as CommentSymbol][0].value) | ||
console.log((parsed as CommentArray<string>)[Symbol.for(symbolName) as CommentSymbol][0].value) | ||
``` | ||
@@ -320,0 +320,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
46353