mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
22 lines
392 B
JavaScript
22 lines
392 B
JavaScript
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.default = _default;
|
||
|
|
||
|
var t = require("@babel/types");
|
||
|
|
||
|
function _default(node) {
|
||
|
const params = node.params;
|
||
|
|
||
|
for (let i = 0; i < params.length; i++) {
|
||
|
const param = params[i];
|
||
|
|
||
|
if (t.isAssignmentPattern(param) || t.isRestElement(param)) {
|
||
|
return i;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return params.length;
|
||
|
}
|