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 0.1.10 to 0.1.11

2

package.json
{
"name": "comment-json",
"version": "0.1.10",
"version": "0.1.11",
"description": "Parse and stringify JSON file with comments",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ # comment-json [![NPM version](https://badge.fury.io/js/comment-json.svg)](http://badge.fury.io/js/comment-json) [![Build Status](https://travis-ci.org/kaelzhang/node-comment-json.svg?branch=master)](https://travis-ci.org/kaelzhang/node-comment-json) [![Dependency Status](https://gemnasium.com/kaelzhang/node-comment-json.svg)](https://gemnasium.com/kaelzhang/node-comment-json)

The usage of `comment-json` is exactly the same as the vanilla `JSON` object.
The usage of `comment-json` is exactly the same as the vanilla [`JSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) object.

@@ -39,7 +39,7 @@ ## Install

### json.parse(string, [reviver])
## json.parse(string, [reviver])
The arguments are the same as the vanilla [`JSON.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
Above all, `json.parse()` is not a parser with 100% accuracy to output a AST which describe every detail of the commented json, including the location of every comments, whitespaces, etc.
Above all, `json.parse()` is not a parser with 100% accuracy to output an AST which describes every detail of the commented json, including the locations of every comments, whitespaces, etc.

@@ -114,3 +114,3 @@ But it DOES work, and could meet most of our requirements to record important informations as fast as possible without making everything too complicated.

### json.stringify(object, [replacer], [space])
## json.stringify(object, [replacer], [space])

@@ -123,3 +123,3 @@ The arguments are the same as the vanilla [`JSON.stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).

If space is not specified, or the space is an empty string, there will be no comments.
If space is not specified, or the space is an empty string, the result of `json.stringify()` will be no comments.

@@ -126,0 +126,0 @@ For the case above:

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