|
hai 1 ano | |
---|---|---|
.. | ||
lib | hai 1 ano | |
README.md | hai 1 ano | |
package.json | hai 1 ano |
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);
// ...
}