@babel/helper-get-function-arity
Usage
JavaScript
import getFunctionArity from "@babel/helper-get-function-arity";
function wrap(state, method, id, scope) {
// ...
if (!t.isFunction(method)) {
return false;
}
const argumentsLength = getFunctionArity(method);
// ...
}