🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

json-truncate

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-truncate - npm Package Compare versions

Comparing version

to
1.0.2

2

index.js

@@ -31,3 +31,3 @@ 'use strict';

try {
return JSON.stringify(truncate(obj, maxDepth || 10));
return truncate(obj, maxDepth || 10);
} catch (e) {

@@ -34,0 +34,0 @@ console.log(e);

{
"name": "json-truncate",
"version": "1.0.1",
"version": "1.0.2",
"description": "A way to truncate a json object.",

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

@@ -26,3 +26,3 @@ # json-truncate [![NPM version](https://badge.fury.io/js/json-truncate.svg)](http://badge.fury.io/js/json-truncate)

* `obj` - The Object that will be truncated.
* `maxDepth` - The depth at which to stop building the valid json.
* `maxDepth` - (optional) The depth at which to stop building the valid json. Defaults to `10`.

@@ -29,0 +29,0 @@