_.isUndefined(value)


160

_.isUndefined(value)
_.isUndefined检查一个值是否是undefined

参数

value (*): 需要检查的值

返回值

(boolean): 如果是undefined返回true,否则false

例子

_.isUndefined(void 0);
// => true
 
_.isUndefined(null);
// => false

源代码

/**
 * Checks if `value` is `undefined`.
 *
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
 * @example
 *
 * isUndefined(void 0)
 * // => true
 *
 * isUndefined(null)
 * // => false
 */
//检查一个值是否是undefined
function isUndefined(value) {
  return value === undefined
}

export default isUndefined

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM