# fast-bind

> the fastest version of Function#bind I could make

Latest version **1.0.0** (published 2014-11-03) · ISC license · 0 weekly downloads

## Install

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

## 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 | 2014-11-03 |
| First published | 2014-11-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nathan Zadoks |
| Maintainers | nathan7 |
| Keywords | function, prototype, bind, perf, performance, fast |

## Links

- npm: https://www.npmjs.com/package/fast-bind
- Repository: https://github.com/nathan7/fast-bind
- Issues: https://github.com/nathan7/fast-bind/issues
- npm.io page: https://npm.io/package/fast-bind

## 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.0.0 (latest) — 2014-11-03

## README

[![Build Status](https://travis-ci.org/nathan7/fast-bind.svg?branch=master)](https://travis-ci.org/nathan7/fast-bind)
# fast-bind
  
  The fastest `Function#bind` I could find.

```
Function#bind (native) x 709,955 ops/sec ±1.79% (84 runs sampled)
Function#bind (slice) x 2,610,293 ops/sec ±1.43% (99 runs sampled)
Function#bind (concat) x 2,622,574 ops/sec ±0.79% (101 runs sampled)
Function#bind (loop) x 2,952,311 ops/sec ±1.63% (95 runs sampled)
Fastest is Function#bind (loop)
4.16x as fast as Function#bind (native)
```

## Installation

    npm install fast-bind

## API

```js
Function.prototype.bind = require('fast-bind')
```

## Faster

  The previous version did not handle using the bound function as a constructor.
  This requires an instanceof check, and slows everything down a bunch.

```
Function#bind (native) x 803,410 ops/sec ±2.35% (79 runs sampled)
Function#bind (slice) x 4,771,960 ops/sec ±0.95% (99 runs sampled)
Function#bind (concat) x 3,838,614 ops/sec ±1.41% (95 runs sampled)
Function#bind (loop) x 6,440,278 ops/sec ±0.69% (97 runs sampled)
Fastest is Function#bind (loop)
8.02x as fast as Function#bind (native)
```

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