@actualwave/call-if-function

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @actualwave/call-if-function

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

1.3 kB

Total Files

3

Last publish

Collaborators

  • actualwave