updates
This commit is contained in:
+8
-3
@@ -2,8 +2,11 @@ const stamp = Date.now();
|
||||
|
||||
export class Ut {
|
||||
|
||||
static EventsUID = 'Events' + stamp;
|
||||
static DataUID = 'Data' + stamp;
|
||||
static EventsUID = `Events_${stamp}`;
|
||||
static DataUID = `Data_${stamp}`;
|
||||
static WidgetUID = `Widget_${stamp}`;
|
||||
|
||||
static evKey = 0;
|
||||
|
||||
static isSet = (val) => typeof val !== 'undefined';
|
||||
static isFn = (val) => typeof val === 'function';
|
||||
@@ -18,6 +21,9 @@ export class Ut {
|
||||
static each = (obj, callback, context) => obj && Object.keys(obj).forEach(key => callback.call(context ?? this, obj[key], key) );
|
||||
|
||||
static tplString = (str, context) => new Function('return `' + str + '`;').call(context || {});
|
||||
|
||||
static nextKey = () => ++Ut.evKey;
|
||||
static resetKey = () => Ut.evKey = 0;
|
||||
|
||||
static extendNode(name, value) {
|
||||
|
||||
@@ -60,7 +66,6 @@ export class Ut {
|
||||
moveevent : ('ontouchstart' in window) ? 'touchmove' : 'mousemove'
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Redirect
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user