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

1.0.0 • Public • Published

innate---a better way to bind

Usage:

import i from 'innate';

// Get a `listen` that is innately bound to app
// (equivalent of `app.listen.bind(app)`)
const listen = i(app).listen;

// Invoke listen without it being on `app` while
// still letting `listen`'s internal `this`
// reference `app`.
listen();

innate has no dependencies and is a tiny little helpful snippet.

It has TypeScript defs, so it is easy to use in your already typed projects, and will give you nice type hints in your editor.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i innate

    Weekly Downloads

    3

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    1.57 kB

    Total Files

    4

    Last publish

    Collaborators

    • hypesystem