@memberjunction/global
Advanced tools
Comparing version
@@ -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
60763
0.19%780
0.13%