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

@mcma/core

Package Overview
Dependencies
Maintainers
3
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcma/core - npm Package Compare versions

Comparing version 0.14.2 to 0.14.3

12

dist/lib/utils.d.ts
declare function isValidUrl(url: string): boolean;
export interface ParsedUrl {
href: string;
protocol: string;
host: string;
hostname: string;
port: string;
pathname: string;
search: string;
hash: string;
}
declare function parseUrl(href: string): ParsedUrl | null;
declare function getTypeName(type: string | object | Function): string;

@@ -10,2 +21,3 @@ declare function toBase64(text: string): string;

isValidUrl: typeof isValidUrl;
parseUrl: typeof parseUrl;
getTypeName: typeof getTypeName;

@@ -12,0 +24,0 @@ toBase64: typeof toBase64;

@@ -14,2 +14,16 @@ "use strict";

}
function parseUrl(href) {
var _a, _b, _c, _d, _e, _f, _g;
const match = href.match(/^(https?:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]?[^?#]*)(\?[^#]*|)(#.*|)$/);
return match && {
href: href !== null && href !== void 0 ? href : "",
protocol: (_a = match[1]) !== null && _a !== void 0 ? _a : "",
host: (_b = match[2]) !== null && _b !== void 0 ? _b : "",
hostname: (_c = match[3]) !== null && _c !== void 0 ? _c : "",
port: (_d = match[4]) !== null && _d !== void 0 ? _d : "",
pathname: (_e = match[5]) !== null && _e !== void 0 ? _e : "",
search: (_f = match[6]) !== null && _f !== void 0 ? _f : "",
hash: (_g = match[7]) !== null && _g !== void 0 ? _g : ""
};
}
function getTypeName(type) {

@@ -66,2 +80,3 @@ if (typeof type === "function") {

isValidUrl,
parseUrl,
getTypeName,

@@ -68,0 +83,0 @@ toBase64,

2

package.json
{
"name": "@mcma/core",
"version": "0.14.2",
"version": "0.14.3",
"description": "Node module with type definitions and helper utils for the EBU MCMA framework",

@@ -5,0 +5,0 @@ "engines": {

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