1.0.0-beta • Published 6 years ago

chainr-proxy v1.0.0-beta

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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...