_isStrictComparable.js 414 B

12345678910111213141516
  1. var isObject = require('./isObject');
  2. /**
  3. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  4. *
  5. * @private
  6. * @param {*} value The value to check.
  7. * @returns {boolean} Returns `true` if `value` if suitable for strict
  8. * equality comparisons, else `false`.
  9. */
  10. function isStrictComparable(value) {
  11. return value === value && !isObject(value);
  12. }
  13. module.exports = isStrictComparable;