1.0.0 • Published 6 years ago

get-func-parameters v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

get-func-parameters

获取函数形参个数。 Obtaining the number of function parameters.

install

npm install --save get-func-parameters

use

const getFuncParameters = require('get-func-parameters');

function func(a,b,c,d){
    return a+b*c*d
}
//参数 functionName
getFuncParameters(func);

// 输出 =>
["a", "b", "c", "d"]