New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-comment-parser

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-comment-parser - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.1.2"></a>
## [1.1.2](https://github.com/forsigner/json-comment-parser/compare/v1.1.1...v1.1.2) (2018-01-02)
### Bug Fixes
* fix parse comment bug ([fd59ec9](https://github.com/forsigner/json-comment-parser/commit/fd59ec9))
<a name="1.1.1"></a>

@@ -7,0 +17,0 @@ ## [1.1.1](https://github.com/forsigner/json-comment-parser/compare/v1.1.0...v1.1.1) (2018-01-02)

27

lib/parse.js

@@ -12,2 +12,3 @@ 'use strict';

var comments = getComments(source);
console.log('comments.............');
console.log(comments);

@@ -24,23 +25,21 @@ /* eslint-disable no-new-func */

var temp = obj.constructor();
var temp = {};
var _loop = function _loop(key) {
if (typeof obj[key] !== 'string') {
if (_typeof(obj[key]) === 'object') {
temp[key] = handleOrigin(obj[key]);
return 'continue';
} else {
console.log('----------------');
var find = comments.find(function (item) {
return item.key === '// ' + key;
});
if (find) {
temp['// ' + key] = find.value;
}
temp[key] = obj[key];
}
var find = comments.find(function (item) {
return item.key === '// ' + key;
});
if (find) {
temp['// ' + key] = find.value;
}
temp[key] = obj[key];
};
for (var key in obj) {
var _ret = _loop(key);
if (_ret === 'continue') continue;
_loop(key);
}

@@ -47,0 +46,0 @@

{
"name": "json-comment-parser",
"description": "",
"version": "1.1.1",
"version": "1.1.2",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "author": {

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