call proxy
$ yarn add call-proxy
const callProxy = require('call-proxy')
let i = 0
const hello = () => `hello ${++i}`
const x = callProxy(hello)
x() // => hello 1
x() // => hello 2
x() // => hello 3
console.log(x.__times__)
// => 3
console.log(x.__calls__)
// [ 'hello 1', 'hello 2', 'hello 3' } ]
Type: function
target function.
Thanks goes to these wonderful people (emoji key):
akameco 💻 📖 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © akameco