unlimited-curry
Advanced tools
Comparing version 1.1.6 to 1.1.7
{ | ||
"name": "unlimited-curry", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Unlimited curry", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -16,3 +16,3 @@ const getFrom = function (from, dataArgument) { | ||
timeoutSate = setTimeout(function ucCallback() { | ||
callback(0, data) | ||
callback(2, data) | ||
}, 0) | ||
@@ -24,3 +24,3 @@ } | ||
const unlimitedCurry = function (callback, returnFunction) { | ||
const unlimitedCurry = function (callback) { | ||
return function () { | ||
@@ -49,3 +49,9 @@ let timeoutSate = null | ||
caller.p = () => new Promise((resolve, reject)=>{ | ||
const ret = returnFunction ? returnFunction(caller.data) : caller.data | ||
clearTimeout(timeoutSate) | ||
let ret = false | ||
if(typeof callback === 'function'){ | ||
ret = callback(1, caller.data) | ||
}else{ | ||
ret = data | ||
} | ||
return resolve(ret) | ||
@@ -56,2 +62,3 @@ }) | ||
level = 0 | ||
returnArrayChunks = [] | ||
/* istanbul ignore else */ | ||
@@ -89,2 +96,1 @@ if(callback){ | ||
module.exports = exports = unlimitedCurry | ||
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
9607
80