Socket
Socket
Sign inDemoInstall

json-truncate

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.3 to 1.1.4

8

dist/json-truncate.js

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc