# fn-args

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

Latest version **6.0.0** (published 2021-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install fn-args
pnpm add fn-args
yarn add fn-args
bun add fn-args
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2021-08-24 |
| First published | 2014-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 53 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | function, arguments, tostring, extract, parse, generator, async, arrow |

## Links

- npm: https://www.npmjs.com/package/fn-args
- Repository: https://github.com/sindresorhus/fn-args
- Homepage: https://github.com/sindresorhus/fn-args#readme
- Issues: https://github.com/sindresorhus/fn-args/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/fn-args

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 6.0.0 (latest) — 2021-08-24
- 5.0.0 — 2019-05-02
- 4.0.0 — 2019-01-30
- 3.0.0 — 2017-04-22
- 2.0.0 — 2016-11-15
- 1.0.0 — 2014-08-13
- 0.1.4 — 2014-04-29
- 0.1.3 — 2014-03-18
- 0.1.2 — 2014-03-17
- 0.1.1 — 2014-03-16
- 0.1.0 — 2014-03-16

## README

# fn-args

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

## Install

```
$ npm install fn-args
```

## Usage

```js
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']
```

---
_Source: https://npm.io/package/fn-args · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
