blob: 61e22edd292753c7583ecba36ebe32aabede04eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _t = require("@babel/types");
const {
isAssignmentPattern,
isRestElement
} = _t;
function _default(node) {
const params = node.params;
for (let i = 0; i < params.length; i++) {
const param = params[i];
if (isAssignmentPattern(param) || isRestElement(param)) {
return i;
}
}
return params.length;
}
|