chainr-proxy
v1.0.0-beta
Published
Chaining your magic methods
Downloads
6
Readme
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...