|  | ||||
|---|---|---|---|---|
| .. | ||||
| lib | 11e3a9652a | 7 anni fa | ||
| README.md | 11e3a9652a | 7 anni fa | ||
| package.json | 11e3a9652a | 7 anni fa | ||
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);
  // ...
}