# @captemulation/get-parameter-names

> Retrieves parameter names from a function

Latest version **1.4.2** (published 2020-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @captemulation/get-parameter-names
pnpm add @captemulation/get-parameter-names
yarn add @captemulation/get-parameter-names
bun add @captemulation/get-parameter-names
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2020-12-01 |
| First published | 2017-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 0.12.0 |
| Dependencies | 2 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Josh Perez |
| Maintainers | captemulation |
| Keywords | argument, function, name, parameter, parse |

## Links

- npm: https://www.npmjs.com/package/@captemulation/get-parameter-names
- Repository: https://github.com/captemulation/get-parameter-names
- Homepage: https://github.com/captemulation/get-parameter-names#readme
- Issues: https://github.com/captemulation/get-parameter-names/issues
- npm.io page: https://npm.io/package/@captemulation/get-parameter-names

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.4.5

## 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

- 1.4.2 (latest) — 2020-12-01
- 1.4.1 — 2020-11-29
- 1.4.0 — 2020-11-29
- 1.3.0 — 2019-06-22
- 1.2.0 — 2017-06-17
- 1.1.0 — 2017-05-17
- 1.0.1 — 2017-04-27
- 1.0.0 — 2017-03-31

## README

get-parameter-names
===================

Retrieves the argument names of a function

## Install

```
npm install @captemulation/get-parameter-names
```

## Usage

```js
function foo(bar, baz) {
  return bar + baz
}

var get = require('@captemulation/get-parameter-names')
get(foo) // = ['bar', 'baz']
```

Also supports fat arrow and default functions

```js
const foo = (a, b = 20) => a + b

var get = require('@captemulation/get-parameter-names')
get(foo) // = ['a', 'b']
```

Also supports ES6 async functions

```js
async function foo(a, b) { return a + b }

var get = require('@captemulation/get-parameter-names')
get(foo) // = ['a', 'b']
```

Also supports ES6 Class constructors

```js

var get = require('@captemulation/get-parameter-names')

class Animal{
  constructor(){}
}
class Cat extends Animal{
  constructor(a, b){
    super();
    get(this.constructor) // = ['a', 'b']
  }
}

get(Cat) // = ['a', 'b']
```

## Tests

```
npm test
```

## License

[MIT](http://josh.mit-license.org)

---
_Source: https://npm.io/package/@captemulation/get-parameter-names · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
