|
преди 4 години | |
---|---|---|
.. | ||
lib | преди 4 години | |
README.md | преди 4 години | |
package.json | преди 4 години |
Function that returns the number of arguments that a function takes.
import getFunctionArity from "@babel/helper-get-function-arity";
function wrap(state, method, id, scope) {
// ...
if (!t.isFunction(method)) {
return false;
}
const argumentsLength = getFunctionArity(method);
// ...
}