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

@memberjunction/global

Package Overview
Dependencies
Maintainers
4
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memberjunction/global - npm Package Compare versions

Comparing version 1.7.1 to 1.8.0

6

dist/util.d.ts

@@ -26,2 +26,8 @@ /**

export declare function CleanJavaScript(javaScriptCode: string): string;
/**
* Simple wrapper method to JSON.parse that catches any errors and logs them to the console. This method is useful when you want to parse JSON but don't want to crash the application if the JSON is invalid.
* @param jsonString
* @returns
*/
export declare function SafeJSONParse<T>(jsonString: string): T;
//# sourceMappingURL=util.d.ts.map

17

dist/util.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CleanJavaScript = exports.CleanJSON = exports.CopyScalarsAndArrays = exports.GetGlobalObjectStore = void 0;
exports.SafeJSONParse = exports.CleanJavaScript = exports.CleanJSON = exports.CopyScalarsAndArrays = exports.GetGlobalObjectStore = void 0;
/**

@@ -141,2 +141,17 @@ * The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared

exports.CleanJavaScript = CleanJavaScript;
/**
* Simple wrapper method to JSON.parse that catches any errors and logs them to the console. This method is useful when you want to parse JSON but don't want to crash the application if the JSON is invalid.
* @param jsonString
* @returns
*/
function SafeJSONParse(jsonString) {
try {
return JSON.parse(jsonString);
}
catch (e) {
console.error("Error parsing JSON string:", e);
return null;
}
}
exports.SafeJSONParse = SafeJSONParse;
//# sourceMappingURL=util.js.map

2

package.json
{
"name": "@memberjunction/global",
"version": "1.7.1",
"version": "1.8.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

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