0.0.1 • Published 4 years ago

@actualwave/call-if-function v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

@actualwave/call-if-function

callIfFunction accepts multiple arguments and checks first one. If it is a function, it will be called with other arguments passed to it(just like for Function.call()) If it is not a function, then value from first argument wil be returned.

I use it in react components, to check if component children are react nodes or a renderer function.