Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jdeurt/force-bind


https://github.com/jdeurt/force-bind

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# force-bind

## Do not use this library it was made as a joke

```js
import { forceBind } from "force-bind";

const arrowFn = (a) => a + this.b;
const thisCtx = {
b: 2,
};

const boundArrowFn = forceBind(arrowFn, thisCtx);

boundArrowFn(1); // returns 3
```