# delegate-normalizer

> Normalizes the value of a function parameter that expects to be passed a callback function or an array of callback functions

Latest version **1.0.0** (published 2016-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install delegate-normalizer
pnpm add delegate-normalizer
yarn add delegate-normalizer
bun add delegate-normalizer
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-04-13 |
| First published | 2016-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexey Gorokhov |
| Maintainers | agorokhov |
| Keywords | util, callback |

## Links

- npm: https://www.npmjs.com/package/delegate-normalizer
- Repository: https://github.com/AlexeyGorokhov/delegate-normalizer
- Issues: https://github.com/AlexeyGorokhov/delegate-normalizer/issues
- npm.io page: https://npm.io/package/delegate-normalizer

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-04-13

## README

# delegate-normalizer

Normalizes the value of a function parameter that expects to be passed a callback function or an array of callback functions.

delegate-normalizer always returns an array of functions. If the parameter is `undefined` or contains no functions, an array with the only `function () {}` function is returned. This allows for invoking callbacks without any extra check:

```javascript
const delegateNormalizer = require('delegate-normalizer');

function (cb) {
  cb = delegateNormalizer(cb);

  // Do something usefull and then...

  cb.forEach(f => { cb(); });
}
```

## Installation

```bash
$ npm install delegate-normalizer --save
```

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