Comparing version 0.3.5 to 0.3.6
@@ -12,8 +12,20 @@ "use strict"; | ||
* @param {Function|any} maybeFunc | ||
* @param {Array} args | ||
* @param {Array} args | ||
* @param {any} scope | ||
* @param {any} def | ||
* @param {any} def | ||
* @returns {any} | ||
*/ | ||
var callFunc = function callFunc(maybeFunc, args, scope, def) { | ||
if (args === void 0) { | ||
args = []; | ||
} | ||
if (scope === void 0) { | ||
scope = _reshowConstant.T_UNDEFINED; | ||
} | ||
if (def === void 0) { | ||
def = _reshowConstant.T_UNDEFINED; | ||
} | ||
return _reshowConstant.FUNCTION === typeof maybeFunc ? maybeFunc.apply(scope, args) : _reshowConstant.UNDEFINED !== typeof def ? def : maybeFunc; | ||
@@ -20,0 +32,0 @@ }; |
{ | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"name": "call-func", | ||
@@ -4,0 +4,0 @@ "repository": { |
@@ -9,2 +9,2 @@ export default callFunc; | ||
*/ | ||
declare function callFunc(maybeFunc: Function | any, args: any[], scope: any, def: any): any; | ||
declare function callFunc(maybeFunc: Function | any, args?: any[], scope?: any, def?: any): any; |
Sorry, the diff of this file is not supported yet
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
27236
764