_.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