保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 9bdb95c9e34cef640534e5e5a1e2225a80442000
PAMapp/node_modules/@babel/helper-function-name/lib/index.js
@@ -5,8 +5,6 @@
});
exports.default = _default;
var _helperGetFunctionArity = require("@babel/helper-get-function-arity");
var _template = require("@babel/template");
var _t = require("@babel/types");
@@ -16,6 +14,7 @@
  cloneNode,
  identifier,
  isAssignmentExpression,
  isAssignmentPattern,
  isFunction,
  isIdentifier,
  isLiteral,
@@ -23,10 +22,17 @@
  isObjectMethod,
  isObjectProperty,
  isRegExpLiteral,
  isRestElement,
  isTemplateLiteral,
  isVariableDeclarator,
  toBindingIdentifierName
} = _t;
function getFunctionArity(node) {
  const count = node.params.findIndex(param => isAssignmentPattern(param) || isRestElement(param));
  return count === -1 ? node.params.length : count;
}
const buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
  (function (FUNCTION_KEY) {
    function FUNCTION_ID() {
@@ -103,7 +109,7 @@
      }).expression;
      const params = template.callee.body.body[0].params;
      for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
      for (let i = 0, len = getFunctionArity(method); i < len; i++) {
        params.push(scope.generateUidIdentifier("x"));
      }
@@ -141,7 +147,7 @@
  parent,
  scope,
  id
}, localBinding = false) {
}, localBinding = false, supportUnicodeId = false) {
  if (node.id) return;
  if ((isObjectProperty(parent) || isObjectMethod(parent, {
@@ -180,6 +186,10 @@
    return;
  }
  if (!supportUnicodeId && isFunction(node) && /[\uD800-\uDFFF]/.test(name)) {
    return;
  }
  name = toBindingIdentifierName(name);
  id = identifier(name);
  id[NOT_LOCAL_BINDING] = true;