0.2.0 • Published 6 years ago
call-proxy v0.2.0
call-proxy
call proxy
Install
$ yarn add call-proxy
Usage
const callProxy = require('call-proxy')
let i = 0
const hello = () => `hello ${++i}`
const x = callProxy(hello)
x()
x()
x()
console.log(x.__times__)
// => 3
console.log(x.__calls__)
// [ 'hello 1', 'hello 2', 'hello 3' } ]
API
loggerProxy(func)
func
Type: function
target function.
__times__
__calls__
Contributors
Thanks goes to these wonderful people (emoji key):
akameco💻 📖 ⚠️ 🚇 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
License
MIT © akameco