jingchaocheng / Lodash

Lodash 源码解析
MIT License
0 stars 1 forks source link

baseIsNaN #51

Open jingchaocheng opened 4 years ago

jingchaocheng commented 4 years ago
/**
 * The base implementation of `isNaN` without support for number objects.
 *
 * @private
 * @param {*} value 要检查的值.
 * @returns {boolean} 如果 "value "是 "NaN",则返回 "true",否则返回 "false"。.
 */
function baseIsNaN(value) {
  // NaN 不等于自身所以 NaN !== NaN 为 true
  return value !== value
}

export default baseIsNaN