Ramda Adjunct 4.0.0

isBoolean.js

  1. import { type, identical, pipe, curryN } from 'ramda';
  2. /**
  3. * Checks if input value is `Boolean`.
  4. *
  5. * @func isBoolean
  6. * @memberOf RA
  7. * @since {@link https://char0n.github.io/ramda-adjunct/0.3.0|v0.3.0}
  8. * @category Type
  9. * @sig * -> Boolean
  10. * @param {*} val The value to test
  11. * @return {boolean}
  12. * @see {@link RA.isNotBoolean|isNotBoolean}
  13. * @example
  14. *
  15. * RA.isBoolean(false); //=> true
  16. * RA.isBoolean(true); //=> true
  17. * RA.isBoolean(null); //=> false
  18. */
  19. const isBoolean = curryN(1, pipe(type, identical('Boolean')));
  20. export default isBoolean;