@cardsgame/utils
Advanced tools
Comparing version 0.1.10 to 0.1.12
@@ -9,3 +9,3 @@ /** | ||
/** | ||
* Executed function multiple times | ||
* Executes function multiple times | ||
* @param length number of times function will be exetuced | ||
@@ -16,2 +16,7 @@ * @param func a function | ||
/** | ||
* Simple delay of execution. Use like this: `await timeout(50)` | ||
* @param ms mili seconds | ||
*/ | ||
export declare const timeout: (ms: number) => Promise<unknown>; | ||
/** | ||
* Check if a `thing` is just a literal object (using typeof), and not Array or anything else. | ||
@@ -18,0 +23,0 @@ * @param thing |
@@ -13,3 +13,3 @@ "use strict"; | ||
/** | ||
* Executed function multiple times | ||
* Executes function multiple times | ||
* @param length number of times function will be exetuced | ||
@@ -22,2 +22,9 @@ * @param func a function | ||
/** | ||
* Simple delay of execution. Use like this: `await timeout(50)` | ||
* @param ms mili seconds | ||
*/ | ||
exports.timeout = function (ms) { | ||
return new Promise(function (resolve) { return setTimeout(resolve, ms); }); | ||
}; | ||
/** | ||
* Check if a `thing` is just a literal object (using typeof), and not Array or anything else. | ||
@@ -24,0 +31,0 @@ * @param thing |
{ | ||
"name": "@cardsgame/utils", | ||
"version": "0.1.10", | ||
"version": "0.1.12", | ||
"description": "", | ||
@@ -21,3 +21,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "9b60df40bd02b30b62350c4a30be2e3ddc0844c0" | ||
"gitHead": "d6a6acb3f3af6970313f1dba7c5b94970a3b2e08" | ||
} |
Sorry, the diff of this file is not supported yet
15690
241