# fast-apply

> Apply an array of arguments... faster

Latest version **0.0.3** (published 2014-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install fast-apply
pnpm add fast-apply
yarn add fast-apply
bun add fast-apply
```

## 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.0.3 |
| Published | 2014-01-27 |
| First published | 2014-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jayce Pulsipher |
| Maintainers | jaycetde |
| Keywords | apply, fast, faster |

## Links

- npm: https://www.npmjs.com/package/fast-apply
- Repository: https://github.com/JayceTDE/fast-apply
- npm.io page: https://npm.io/package/fast-apply

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

- 0.0.3 (latest) — 2014-01-27
- 0.0.2 — 2014-01-19
- 0.0.1 — 2014-01-19
- 0.0.0 — 2014-01-19

## README

# fast-apply

Apply an array of arguments... faster.

```javascript

var fastApply = require('fast-apply')
  , scope = {}
;

function run() {}

fastApply(run, scope, [ 'a', 'b', 'c' ]);

```

## Installation

    $ npm install fast-apply

## Dependencies

none

## Speed

It uses a simple switch statement to `call` the function rather than `apply` for up to 5 arguments.

While more than 5 arguments would run faster using `apply`, anything less will be 
[up to twice as fast](http://jsperf.com/many-arguments-apply-vs-switch/2)

If the scope is `null`, fastApply will run up to 3 times faster than `apply`

## Limitations

  - It is only optimized for 5 arguments or less. If you think the function will frequently be taking
  more than 5 arguments, I suggest that you instead use `apply`

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