1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | var commentMath = /(\/\/.*)|(\/\*[\s\S]*?\*\/)/g;
|
5 |
|
6 | var argsMath = /.*?\(([^)]*)\)/;
|
7 | var argMath = /[a-z0-9A-Z_]+/;
|
8 | function argnames(func) {
|
9 | var funcStr = func.toString().replace(commentMath, "");
|
10 | var matchArray = funcStr.match(argsMath);
|
11 | return matchArray[1]
|
12 | .split(",")
|
13 | .filter(function (arg) {
|
14 | return arg.trim();
|
15 | })
|
16 | .map(function (arg) {
|
17 | return arg.match(argMath)[0];
|
18 | });
|
19 | }
|
20 | exports.default = argnames;
|
21 |
|
\ | No newline at end of file |