项目原始demo,不改动
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ce dépôt est archivé. Vous pouvez voir les fichiers et le cloner, mais vous ne pouvez pas pousser ni ouvrir de ticket/demande d'ajout.
 
 
 
 
xzx 2ec7739298 [Version] V.3.8 il y a 4 ans
..
lib [Version] V.3.8 il y a 4 ans
README.md [Version] V.3.8 il y a 4 ans
package.json [Version] V.3.8 il y a 4 ans

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);

  // ...
}