Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

comment-json

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comment-json - npm Package Compare versions

Comparing version 4.2.3 to 4.2.4

2

index.d.ts

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc