corifeus-utils
Advanced tools
Comparing version 1.1.303-88 to 1.1.317-10
{ | ||
"name": "corifeus-utils", | ||
"version": "1.1.303-88", | ||
"version": "1.1.317-10", | ||
"corifeus": { | ||
@@ -35,3 +35,3 @@ "icon": "fa fa-lightbulb-o", | ||
"devDependencies": { | ||
"corifeus-builder": "^1.7.630-72" | ||
"corifeus-builder": "^1.7.647-7" | ||
}, | ||
@@ -38,0 +38,0 @@ "dependencies": { |
@@ -23,3 +23,3 @@ [//]: #@corifeus-header | ||
``` | ||
v7.10.0 | ||
v8.0.0 | ||
``` | ||
@@ -32,2 +32,5 @@ | ||
### Updating | ||
Since, I work full time, I can work only on weekends and Github updates are released only Sundays. Minor errors can be released any time, but reflects will be shown only in NPM. | ||
# Description | ||
@@ -70,3 +73,3 @@ | ||
* promise | ||
* extract (simple adds the reject, resolve, promise, instead callback) | ||
* deferred (simple extract the reject, resolve and promise function, instead of callback) | ||
* process | ||
@@ -99,3 +102,3 @@ * unhandledRejection | ||
--- | ||
[**CORIFEUS-UTILS**](https://pages.corifeus.tk/corifeus-utils) Build v1.1.303-88 | ||
[**CORIFEUS-UTILS**](https://pages.corifeus.tk/corifeus-utils) Build v1.1.317-10 | ||
@@ -102,0 +105,0 @@ [Corifeus](http://www.corifeus.tk) by [Patrik Laszlo](http://patrikx3.tk) |
module.exports.forEachAsync = require('./for-each-async'); | ||
module.exports.isfy = (input) => { | ||
const args = Array.prototype.slice.call(input); | ||
return args.sort(); | ||
} | ||
if (!Array.prototype.forEachAsync) { | ||
@@ -4,0 +9,0 @@ const forEachAsync = module.exports.forEachAsync; |
@@ -60,2 +60,4 @@ const url = require('url'); | ||
res.body = parsedData; | ||
} else { | ||
res.body = rawData; | ||
} | ||
@@ -62,0 +64,0 @@ resolve(res); |
@@ -21,2 +21,3 @@ module.exports = { | ||
timer: require('./timer'), | ||
input: require('./input'), | ||
} | ||
@@ -23,0 +24,0 @@ |
@@ -0,1 +1,2 @@ | ||
const cloneDeep = require('lodash/cloneDeep') | ||
module.exports.clone = (obj) => { | ||
@@ -5,3 +6,3 @@ if (obj === null || obj === undefined) { | ||
} | ||
return Object.assign({}, obj); | ||
return cloneDeep(obj); | ||
} |
@@ -12,3 +12,3 @@ const ms = require('ms'); | ||
module.exports.verbose = (timestamp, started = Date.now()) => { | ||
module.exports.verbose = (timestamp, started) => { | ||
if (timestamp === undefined) { | ||
@@ -18,3 +18,3 @@ return undefined; | ||
return { | ||
left: ms(timestamp - started), | ||
left: ms(timestamp - Date.now()), | ||
end: new Date(timestamp).toLocaleString(), | ||
@@ -21,0 +21,0 @@ start: new Date(started).toLocaleString(), |
const promiseUtils = require('./promise'); | ||
module.exports.setTimeout = async (cb, timeout) => { | ||
const wait = async(timeout) => { | ||
return await corySetTimeout(timeout); | ||
} | ||
const corySetTimeout = async (cb, timeout) => { | ||
if (timeout === undefined) { | ||
timeout = cb; | ||
cb = () => {}; | ||
} | ||
const { resolve, reject, promise} = promiseUtils.deferred(); | ||
@@ -18,3 +26,3 @@ | ||
module.exports.setInterval = async(cb, timeout) => { | ||
const corySetInterval = async(cb, timeout) => { | ||
const { resolve, reject, promise} = promiseUtils.deferred(); | ||
@@ -33,2 +41,6 @@ | ||
return promise; | ||
} | ||
} | ||
module.exports.wait = wait; | ||
module.exports.setTimeout = corySetTimeout; | ||
module.exports.setInterval = corySetInterval ; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26091
27
629
104