Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

1234567891011121314151617181920212223242526272829
  1. var baseGetTag = require('./_baseGetTag'),
  2. isObjectLike = require('./isObjectLike');
  3. /** `Object#toString` result references. */
  4. var boolTag = '[object Boolean]';
  5. /**
  6. * Checks if `value` is classified as a boolean primitive or object.
  7. *
  8. * @static
  9. * @memberOf _
  10. * @since 0.1.0
  11. * @category Lang
  12. * @param {*} value The value to check.
  13. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  14. * @example
  15. *
  16. * _.isBoolean(false);
  17. * // => true
  18. *
  19. * _.isBoolean(null);
  20. * // => false
  21. */
  22. function isBoolean(value) {
  23. return value === true || value === false ||
  24. (isObjectLike(value) && baseGetTag(value) == boolTag);
  25. }
  26. module.exports = isBoolean;