if-func

    1.0.0 • Public • Published

    if-func

    Just a tool specifically for the following scenes

      if (typeof(foo) === 'function) {
        foo(args)
      } else {
        bar(args)
      }
    

    Now you can use ifFunc, like this

      ifFunc(foo).call(this, args).else(bar)
    

    Install

    npm i if-func

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • tobeyouth