comment-json
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -94,3 +94,5 @@ // Original from DefinitelyTyped. Thanks a million | ||
source: TSource, | ||
keys?: readonly (keyof TSource)[] | ||
// Although it actually accepts more key types and filters then`, | ||
// we set the type of `keys` stricter | ||
keys?: readonly (number | string)[] | ||
): TTarget |
{ | ||
"name": "comment-json", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "Parse and stringify JSON with comments. It will retain comments even after saved!", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -131,3 +131,3 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-comment-json.svg?branch=master)](https://travis-ci.org/kaelzhang/node-comment-json) | ||
Returns `object | string | number | boolean | null` corresponding to the given JSON text. | ||
Returns `CommentJSONValue` (`object | string | number | boolean | null`) corresponding to the given JSON text. | ||
@@ -134,0 +134,0 @@ If the `content` is: |
const hasOwnProperty = require('has-own-prop') | ||
const {isObject, isArray} = require('core-util-is') | ||
const { | ||
isObject, | ||
isArray, | ||
isString, | ||
isNumber | ||
} = require('core-util-is') | ||
@@ -108,2 +113,6 @@ const PREFIX_BEFORE = 'before' | ||
keys.forEach(key => { | ||
if (!isString(key) && !isNumber(key)) { | ||
return | ||
} | ||
if (!hasOwnProperty(source, key)) { | ||
@@ -110,0 +119,0 @@ return |
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
45215
1103