I want to get a list of argument names of Function
, for example:
var f = (a, b, c) => console.log(a, b, c);
var [fargs] = something.like.inspect.getargspec(f);
console.log(fargs); // ['a', 'b', 'c']
I want to get a list of argument names of Function
, for example:
var f = (a, b, c) => console.log(a, b, c);
var [fargs] = something.like.inspect.getargspec(f);
console.log(fargs); // ['a', 'b', 'c']
If you're using Node and want the argument names, check out the introspect
NPM module:
> var introspect = require('introspect')
> var f = (a, b, c) => console.log(a, b, c);
> console.log(introspect(f))
[ 'a', 'b', 'c' ]