@memberjunction/global
Advanced tools
Comparing version 1.8.1 to 2.0.0
@@ -31,3 +31,3 @@ /** | ||
*/ | ||
export declare function SafeJSONParse<T>(jsonString: string): T; | ||
export declare function SafeJSONParse<T>(jsonString: string, logErrors?: boolean): T; | ||
//# sourceMappingURL=util.d.ts.map |
@@ -146,3 +146,3 @@ "use strict"; | ||
*/ | ||
function SafeJSONParse(jsonString) { | ||
function SafeJSONParse(jsonString, logErrors = false) { | ||
try { | ||
@@ -152,3 +152,4 @@ return JSON.parse(jsonString); | ||
catch (e) { | ||
console.error("Error parsing JSON string:", e); | ||
if (logErrors) | ||
console.error("Error parsing JSON string:", e); | ||
return null; | ||
@@ -155,0 +156,0 @@ } |
{ | ||
"name": "@memberjunction/global", | ||
"version": "1.8.1", | ||
"version": "2.0.0", | ||
"description": "MemberJunction: Global Object - Needed for ALL other MJ components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60763
780
1