Comparing version 1.0.1 to 1.0.2
@@ -10,11 +10,19 @@ /** | ||
Object.defineProperty = function ObjectDefineProperty(object, prop_name, prop_attr) { | ||
Object.defineProperty = ObjectDefineProperty; | ||
Object.defineProperties = ObjectDefineProperties; | ||
Object.merge = ObjectMerge; | ||
Object.generate = ObjectGenerate; | ||
Object.typeof = TypeOf; | ||
function ObjectDefineProperty(object, prop_name, prop_attr) { | ||
_ObjectDefineProperty(object, prop_name, prop_attr); | ||
return object; | ||
}; | ||
Object.defineProperties = function ObjectDefineProperties(object, prop_contents) { | ||
} | ||
function ObjectDefineProperties(object, prop_contents) { | ||
_ObjectDefineProperties(object, prop_contents); | ||
return object; | ||
}; | ||
Object.merge = function ObjectMerge(target, source) { | ||
} | ||
function ObjectMerge(target, source) { | ||
if ( Object(target) !== target ) { | ||
@@ -55,4 +63,4 @@ throw new Error("Given target is not an object"); | ||
return target; | ||
}; | ||
Object.generate = function ObjectGenerate(prototype=null, ...props) { | ||
} | ||
function ObjectGenerate(prototype=null, ...props) { | ||
const object = Object.create(prototype); | ||
@@ -65,4 +73,4 @@ for ( carrier of props ) { | ||
return object; | ||
}; | ||
Object.typeof = function TypeOf(input, resolveObj=false) { | ||
} | ||
function TypeOf(input, resolveObj=false) { | ||
const type = typeof input; | ||
@@ -175,2 +183,2 @@ switch(type) { | ||
return "object"; | ||
}; | ||
} |
{ | ||
"name": "extes", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A tiny library that extends native js with some handy tools", | ||
@@ -5,0 +5,0 @@ "main": "index.mjs", |
@@ -5,3 +5,8 @@ /** | ||
**/ | ||
Promise.wait = function PromiseWaitAll(promise_queue=[]) { | ||
Promise.wait = PromiseWaitAll; | ||
Promise.create = FlattenedPromise; | ||
function PromiseWaitAll(promise_queue=[]) { | ||
if ( !Array.isArray(promise_queue) ){ | ||
@@ -39,4 +44,4 @@ promise_queue = [promise_queue]; | ||
}); | ||
}; | ||
Promise.create = function FlattenedPromise() { | ||
} | ||
function FlattenedPromise() { | ||
let _resolve=null, _reject=null; | ||
@@ -51,2 +56,2 @@ const promise = new Promise((resolve, reject)=>{ | ||
return promise; | ||
}; | ||
} |
@@ -5,3 +5,9 @@ /** | ||
**/ | ||
setTimeout.create = function ThrottledTimeout() { | ||
setTimeout.create = ThrottledTimeout; | ||
setInterval.create = ThrottledTimer; | ||
setTimeout.idle = Idle; | ||
function ThrottledTimeout() { | ||
let _scheduled = null; | ||
@@ -59,7 +65,7 @@ let _executing = false; | ||
} | ||
}; | ||
setTimeout.idle = function Idle(duration=0) { | ||
} | ||
function Idle(duration=0) { | ||
return new Promise((resolve)=>{setTimeout(resolve, duration)}); | ||
}; | ||
setInterval.create = function ThrottledTimer() { | ||
} | ||
function ThrottledTimer() { | ||
const _timeout = ThrottledTimeout(); | ||
@@ -84,2 +90,2 @@ const timeout_cb = (cb, interval=0, ...args)=>{ | ||
return timeout_cb; | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
272
0
23072