nextalys-js-helpers
Advanced tools
Comparing version
@@ -5,3 +5,4 @@ export declare class GlobalHelpers { | ||
private static GetGlobalRef; | ||
static BindGlobalMethodSimple(name: string, func: any, prefix?: string): void; | ||
static BindGlobalMethodUnique(name: string, func: any): string; | ||
static BindGlobalMethodSimple(name: string, func: any, prefix?: string, addGuid?: boolean): string; | ||
static BindGlobalMethod(name: string, methodWrapperObject: any): void; | ||
@@ -8,0 +9,0 @@ static GetGlobalMethod(name: string): any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.GlobalHelpers = void 0; | ||
var main_helpers_1 = require("../helpers/main-helpers"); | ||
var GlobalHelpers = /** @class */ (function () { | ||
@@ -19,3 +20,6 @@ function GlobalHelpers() { | ||
}; | ||
GlobalHelpers.BindGlobalMethodSimple = function (name, func, prefix) { | ||
GlobalHelpers.BindGlobalMethodUnique = function (name, func) { | ||
return this.BindGlobalMethodSimple(name, func, this.globalPrefix, true); | ||
}; | ||
GlobalHelpers.BindGlobalMethodSimple = function (name, func, prefix, addGuid) { | ||
if (!this.GetGlobalRef() || !name || !func) { | ||
@@ -27,3 +31,8 @@ return; | ||
} | ||
this.GetGlobalRef()[prefix + name] = func; | ||
if (addGuid) { | ||
prefix += '_' + main_helpers_1.MainHelpers.generateGuid(); | ||
} | ||
var methodFullName = prefix + name; | ||
this.GetGlobalRef()[methodFullName] = func; | ||
return methodFullName; | ||
}; | ||
@@ -30,0 +39,0 @@ GlobalHelpers.BindGlobalMethod = function (name, methodWrapperObject) { |
{ | ||
"name": "nextalys-js-helpers", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Nextalys Javascript Helpers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1238139
0.06%19124
0.05%