updates
This commit is contained in:
+2
-6
@@ -15,14 +15,10 @@ export class Ut {
|
||||
|
||||
static trigger = (handler, ...args) => typeof handler === 'function' ? handler.call(this, ...args) : null;
|
||||
|
||||
static each(obj, callback, context) {
|
||||
for (let key in obj) {
|
||||
callback.call(context || this, obj[key], key);
|
||||
}
|
||||
}
|
||||
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 extendNode(name, value) {
|
||||
|
||||
if (!Object.getOwnPropertyDescriptor(Node.prototype, name)) {
|
||||
|
||||
Reference in New Issue
Block a user