|
|
před 2 týdny | |
|---|---|---|
| .. | ||
| lib | před 2 týdny | |
| README.md | před 2 týdny | |
| package.json | před 2 týdny | |
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);
// ...
}