force-bind
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

force-bind

Do not use this library it was made as a joke

import { forceBind } from "force-bind";

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

const boundArrowFn = forceBind(arrowFn, thisCtx);

boundArrowFn(1); // returns 3

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.22latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.22
0.0.10

Package Sidebar

Install

npm i force-bind

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

7.19 kB

Total Files

10

Last publish

Collaborators

  • jdeurt