fn-args

3.0.0 • Public • Published

fn-args Build Status

Get the arguments of a function, arrow function, generator function, async function

Install

$ npm install --save fn-args

Usage

const fnArgs = require('fn-args');
 
fnArgs(function (foo, bar) {});
//=> ['foo', 'bar']
 
fnArgs((foo, bar) => {});
//=> ['foo', 'bar']
 
fnArgs(function * (foo, bar) {});
//=> ['foo', 'bar']
 
fnArgs(async function (foo, bar) {});
//=> ['foo', 'bar']

License

MIT © Sindre Sorhus

install

npm i fn-args

Downloadsweekly downloads

25,727

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability