Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.1 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 @@

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