New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

machinepack-util

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-util - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

13

machines/parse-json.js

@@ -23,2 +23,6 @@ module.exports = {

},
couldNotParse: {
description: 'Could not parse provided string- must be a valid JSON string.',
extendedDescription: 'Oftentimes this error is a result of not using double-quotes. Refer to the official JSON specification at http://www.json.org/ for more information.'
},
success: {

@@ -32,5 +36,12 @@ description: 'Done.',

fn: function(inputs, exits) {
return exits.success(JSON.parse(inputs.json));
var parsedJson;
try {
parsedJson = JSON.parse(inputs.json);
}
catch (e){
return exits.couldNotParse(e);
}
return exits.success(parsedJson);
},
};

2

package.json
{
"name": "machinepack-util",
"version": "0.6.1",
"version": "0.7.0",
"description": "Utilities for working with arrays, dictionaries, strings, etc.",

@@ -5,0 +5,0 @@ "scripts": {

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