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

1.0.0-beta • Public • Published

Chainr

Chainr is a tiny utility to make you possible to call undefined methods, by using Proxy.

import { createInstance } from 'chainr-proxy'
const chainr = createInstance(function dispatch (keys, args) {
  console.log(keys, args)
})

chainr()                        // [], []
chainr.what.is.this.method()    // ['what', 'is', 'this', 'method'], []
chainr['amazing!!!'](1, 2, 3)   // ['amazing!!!'], [1, 2, 3]

API

Coming soon...

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i chainr-proxy

    Weekly Downloads

    0

    Version

    1.0.0-beta

    License

    MIT

    Unpacked Size

    18.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • hjkcai