json-truncate
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -11,6 +11,2 @@ 'use strict'; | ||
var isFlat = function isFlat(val) { | ||
return flatTypes.indexOf(val.constructor) !== -1; | ||
}; | ||
var isDefined = function isDefined(val) { | ||
@@ -20,2 +16,6 @@ return val !== null && val !== undefined; | ||
var isFlat = function isFlat(val) { | ||
return !isDefined(val) || flatTypes.indexOf(val.constructor) !== -1; | ||
}; | ||
var truncate = function truncate(obj, maxDepth, curDepth) { | ||
@@ -22,0 +22,0 @@ curDepth = curDepth || 0; |
{ | ||
"name": "json-truncate", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "A way to truncate a json object.", | ||
"main": "index.js", | ||
"scripts": { | ||
"precommit": "npm run standard && npm run build && npm run cover && npm run coverage-check", | ||
"precommit": "npm run standard && npm run cover && npm run coverage-check", | ||
"commit": "git-cz", | ||
@@ -13,3 +13,3 @@ "standard": "standard", | ||
"coverage-report": "nyc report --reporter=lcov", | ||
"test": "_mocha --compilers js:babel-register", | ||
"test": "npm run build && _mocha --compilers js:babel-register", | ||
"prebuild": "rimraf dist", | ||
@@ -16,0 +16,0 @@ "build": "babel --copy-files --out-dir dist src", |
@@ -5,6 +5,2 @@ 'use strict' | ||
const isFlat = val => { | ||
return flatTypes.indexOf(val.constructor) !== -1 | ||
} | ||
const isDefined = val => { | ||
@@ -14,2 +10,6 @@ return val !== null && val !== undefined | ||
const isFlat = val => { | ||
return !isDefined(val) || flatTypes.indexOf(val.constructor) !== -1 | ||
} | ||
const truncate = (obj, maxDepth, curDepth) => { | ||
@@ -16,0 +16,0 @@ curDepth = curDepth || 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
8079