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

@memberjunction/global

Package Overview
Dependencies
Maintainers
0
Versions
242
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 2.13.4 to 2.14.0

7

dist/util.d.ts

@@ -32,2 +32,9 @@ /**

export declare function SafeJSONParse<T>(jsonString: string, logErrors?: boolean): T;
/**
* This function takes in a string of text(assuming markdown, or just newline formatted), and converts it to an HTML list. The list type can be either ordered or unordered.
* @param htmlListType
* @param text
* @returns
*/
export declare function ConvertMarkdownStringToHtmlList(htmlListType: 'Ordered' | 'Unordered', text: string): string;
//# sourceMappingURL=util.d.ts.map

23

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

@@ -157,2 +157,23 @@ * 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.SafeJSONParse = SafeJSONParse;
/**
* This function takes in a string of text(assuming markdown, or just newline formatted), and converts it to an HTML list. The list type can be either ordered or unordered.
* @param htmlListType
* @param text
* @returns
*/
function ConvertMarkdownStringToHtmlList(htmlListType, text) {
try {
const listTag = htmlListType === 'Unordered' ? 'ul' : 'ol';
if (!text.includes('\n')) {
return text;
}
const listItems = text.split('\n').map(line => `<li>${line.trim().replace(/^-\s*/, '')}</li>`).join('');
return `<${listTag}>${listItems}</${listTag}>`;
}
catch (e) {
console.error("Error converting markdown string to HTML list:", e);
return null;
}
}
exports.ConvertMarkdownStringToHtmlList = ConvertMarkdownStringToHtmlList;
//# sourceMappingURL=util.js.map

2

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