0.2.0 • Published 6 years ago

call-proxy v0.2.0

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

call-proxy

Build Status tested with jest styled with prettier All Contributors

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

0.2.0

6 years ago

0.1.0

6 years ago