# function-params

> Get parameter names for a given function (with ES6 arrow syntax support)

Latest version **0.1.0** (published 2015-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install function-params
pnpm add function-params
yarn add function-params
bun add function-params
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-06-29 |
| First published | 2015-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Joakim Carlstein |
| Maintainers | joakimbeng |
| Keywords | function, parameters, params, arguments |

## Links

- npm: https://www.npmjs.com/package/function-params
- Repository: https://github.com/joakimbeng/function-params
- Homepage: https://github.com/joakimbeng/function-params#readme
- Issues: https://github.com/joakimbeng/function-params/issues
- npm.io page: https://npm.io/package/function-params

## Recent versions

- 0.1.0 (latest) — 2015-06-29

## README

# function-params

[![Build status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url]

> Get parameter names for a given function (with ES6 arrow syntax support)

## Installation

Install `function-params` using [npm](https://www.npmjs.com/):

```bash
npm install --save function-params
```

## Usage

### Module usage

```javascript
var functionParams = require('function-params');

functionParams(function (a, b, /* c */ d, e = 'f')); // ['a', 'b', 'd', 'e']

// Arrow functions:
functionParams(a => a); // ['a']
```

## API

### `functionParams(fn)`

| Name | Type | Description |
|------|------|-------------|
| fn | `Function` | The function to get parameter names for |

Get parameter names from a function.

### `functionParams.fromString(str)`

| Name | Type | Description |
|------|------|-------------|
| str | `String` | A stringified function to get parameter names for |

Get parameter names from a function string.

## License

MIT

[npm-url]: https://npmjs.org/package/function-params
[npm-image]: https://badge.fury.io/js/function-params.svg
[travis-url]: https://travis-ci.org/joakimbeng/function-params
[travis-image]: https://travis-ci.org/joakimbeng/function-params.svg?branch=master

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