not.js 612 B

12345678910111213141516171819202122232425262728
  1. import _curry1 from "./internal/_curry1.js";
  2. /**
  3. * A function that returns the `!` of its argument. It will return `true` when
  4. * passed false-y value, and `false` when passed a truth-y one.
  5. *
  6. * @func
  7. * @memberOf R
  8. * @since v0.1.0
  9. * @category Logic
  10. * @sig * -> Boolean
  11. * @param {*} a any value
  12. * @return {Boolean} the logical inverse of passed argument.
  13. * @see R.complement
  14. * @example
  15. *
  16. * R.not(true); //=> false
  17. * R.not(false); //=> true
  18. * R.not(0); //=> true
  19. * R.not(1); //=> false
  20. */
  21. var not =
  22. /*#__PURE__*/
  23. _curry1(function not(a) {
  24. return !a;
  25. });
  26. export default not;