项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
xzx 2ec7739298 [Version] V.3.8 преди 4 години
..
lib [Version] V.3.8 преди 4 години
README.md [Version] V.3.8 преди 4 години
package.json [Version] V.3.8 преди 4 години

README.md

@babel/helper-get-function-arity

Function that returns the number of arguments that a function takes.

  • Examples of what is considered an argument can be found at MDN Web Docs

Usage

import getFunctionArity from "@babel/helper-get-function-arity";

function wrap(state, method, id, scope) {
  // ...
  if (!t.isFunction(method)) {
    return false;
  }

  const argumentsLength = getFunctionArity(method);

  // ...
}