You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
646 B

4 years ago
  1. import _curry2 from "./internal/_curry2.js";
  2. /**
  3. * Returns `true` if one or both of its arguments are `true`. Returns `false`
  4. * if both arguments are `false`.
  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} the first argument if truthy, otherwise the second argument.
  14. * @see R.either, R.xor
  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;