Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdeurt/force-bind
https://github.com/jdeurt/force-bind
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jdeurt/force-bind
- Owner: jdeurt
- License: mit
- Created: 2023-01-15T09:36:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-15T23:27:15.000Z (almost 2 years ago)
- Last Synced: 2024-11-10T10:51:51.530Z (about 2 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
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
```