1.0.0 • Published 2 years ago

innate v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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.