or.js 620 B

1234567891011121314151617181920212223242526272829
  1. import _curry2 from "./internal/_curry2.js";
  2. /**
  3. * Returns the first argument if it is truthy, otherwise the second argument.
  4. * Acts as the boolean `or` statement if both inputs are `Boolean`s.
  5. *
  6. * @func
  7. * @memberOf R
  8. * @since v0.1.0
  9. * @category Logic
  10. * @sig a -> b -> a | b
  11. * @param {Any} a
  12. * @param {Any} b
  13. * @return {Any}
  14. * @see R.either, R.and
  15. * @example
  16. *
  17. * R.or(true, true); //=> true
  18. * R.or(true, false); //=> true
  19. * R.or(false, true); //=> true
  20. * R.or(false, false); //=> false
  21. */
  22. var or =
  23. /*#__PURE__*/
  24. _curry2(function or(a, b) {
  25. return a || b;
  26. });
  27. export default or;