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)

Readme

Keywords

Package Sidebar

Install

npm i if-func

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tobeyouth