Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

machinepack-json

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-json - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

12

machines/stringify-safe.js

@@ -41,4 +41,8 @@ module.exports = {

var util = require('util');
// Backwards compat for Node v0.10 (which doesn't have `util.is*()` qualifiers)
var isFunction = require('lodash.isfunction');
var isRegExp = require('lodash.isregexp');
var isError = require('lodash.iserror');
/**

@@ -71,9 +75,9 @@ * This was modified by @mikermcneil from @isaacs' json-stringify-safe

// Do some advanced serialization
if (util.isError(value)){
if (isError(value)){
value = value.stack;
}
else if (util.isRegExp(value)){
else if (isRegExp(value)){
value = value.toString();
}
else if (util.isFunction(value)){
else if (isFunction(value)){
value = value.toString();

@@ -80,0 +84,0 @@ }

{
"name": "machinepack-json",
"version": "2.0.0",
"version": "2.0.1",
"description": "Encode and decode data to and from JSON.",

@@ -16,2 +16,5 @@ "scripts": {

"dependencies": {
"lodash.iserror": "3.1.1",
"lodash.isfunction": "3.0.8",
"lodash.isregexp": "3.0.5",
"machine": "~12.1.0"

@@ -18,0 +21,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