Purposes
Safe run functions with params (or not).
Installation
$ npm install fn-safe-run
Usage
Method | Description |
---|---|
checkAndRun | Checking and run first param if it is a function. Other parameters are arguments to the passed function. |
checkAndRunLog | Same as checkAndRun but logging if the first param is not a function (Use for debugging). |
Example
import