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

/force-bind/

    Package Sidebar

    Install

    npm i force-bind

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    7.19 kB

    Total Files

    10

    Last publish

    Collaborators

    • jdeurt