Socket
Socket
Sign inDemoInstall

try-json-parse

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

try-json-parse - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

CHANGELOG.md

6

index.js
"use strict";
function tryToParseJson(string) {
function tryToParseJson(string, reviver) {
var result;
try {
result = JSON.parse(string);
result = JSON.parse(string, reviver);
} catch (error) {
// oh error? well just return null, no biggie
result = null;
result = undefined;
}

@@ -12,0 +12,0 @@

{
"name": "try-json-parse",
"version": "0.0.1",
"version": "0.1.0",
"description": "Doesn't throw an error when JSON.parse() fails, just returns null",

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

@@ -0,0 +0,0 @@ ### try-json-parse

@@ -0,0 +0,0 @@ var JSONparse = require('./index'),

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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