JSPM

Found 8 results for either-or

@stdlib/utils-if-then

If a condition is truthy, invoke `x`; otherwise, invoke `y`.

  • v0.2.2
  • 15.40
  • Published

@stdlib/utils-try-then

If a function does not throw, return the function return value; otherwise, return the return value of a second function.

  • v0.2.2
  • 13.58
  • Published

@stdlib/utils-if-else

If a condition is truthy, return `x`; otherwise, return `y`.

  • v0.2.2
  • 13.55
  • Published

@stdlib/utils-async-if-else

If a predicate function returns a truthy value, return `x`; otherwise, return `y`.

  • v0.2.2
  • 10.13
  • Published

@stdlib/utils-async-if-then

If a predicate function returns a truthy value, invoke `x`; otherwise, invoke `y`.

  • v0.2.2
  • 9.37
  • Published

@stdlib/utils-async-try-then

If a function does not return an error, invoke a callback with the function result; otherwise, invoke a second function.

  • v0.2.2
  • 8.31
  • Published

@stdlib/utils-async-try-catch

If a function does not return an error, invoke a callback with the function result; otherwise, invoke a callback with a value `y`.

  • v0.2.2
  • 8.22
  • Published

@stdlib/utils-try-catch

If a function does not throw, return the function return value; otherwise, return `y`.

  • v0.2.2
  • 5.06
  • Published