@cjser/fn-args
v6.0.0-cjser.2
Published
Get the arguments of a function, arrow function, generator function, async function
Downloads
73
Maintainers
Readme
fn-args
Get the arguments of a function, arrow function, generator function, async function
Install
$ npm install fn-argsUsage
import functionArguments from 'fn-args';
functionArguments(function (foo, bar) {});
//=> ['foo', 'bar']
functionArguments((foo, bar) => {});
//=> ['foo', 'bar']
functionArguments(function * (foo, bar) {});
//=> ['foo', 'bar']
functionArguments(async function (foo, bar) {});
//=> ['foo', 'bar']cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/fn-args
