source: trip-planner-front/node_modules/@babel/helper-get-function-arity/lib/index.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 445 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = _default;
7
8var _t = require("@babel/types");
9
10const {
11 isAssignmentPattern,
12 isRestElement
13} = _t;
14
15function _default(node) {
16 const params = node.params;
17
18 for (let i = 0; i < params.length; i++) {
19 const param = params[i];
20
21 if (isAssignmentPattern(param) || isRestElement(param)) {
22 return i;
23 }
24 }
25
26 return params.length;
27}
Note: See TracBrowser for help on using the repository browser.