How to use the isNullOrUndefined function from util

Find comprehensive JavaScript util.isNullOrUndefined code examples handpicked from public code repositorys.

77
78
79
80
81
82
83
84
85
86
  // false
```


<div id="isNullOrUndefined" class="anchor"></div>
## util.isNullOrUndefined(object)

> 稳定度:0 - 已废弃

如果给定的 'object' 是 `null` 或 `undefined`,返回 `true`。否则,返回 `false`。
fork icon21
star icon99
watch icon2

52
53
54
55
56
57
58
59
60
61

/**
 * Builds the result and makes its properties immutable.
 */
Result.prototype.build = function () {
    if (util.isNullOrUndefined(this.mFrom) || util.isNullOrUndefined(this.mMessageId) || util.isNullOrUndefined(this.mMessageType)) {
        throw new IllegalArgumentException();
    } else if (this.mMessageType == 'nack' && (util.isNullOrUndefined(this.mError) || util.isNullOrUndefined(this.mErrorDescription))) {
        throw new IllegalArgumentException();
    } else {
fork icon23
star icon38
watch icon7

+ 3 other calls in file