ember-source
Version:
A JavaScript framework for creating ambitious web applications
29 lines (25 loc) • 598 B
JavaScript
/**
@module @ember/utils
*/
/**
Returns true if the passed value is null or undefined. This avoids errors
from JSLint complaining about use of ==, which can be technically
confusing.
```javascript
isNone(null); // true
isNone(undefined); // true
isNone(''); // false
isNone([]); // false
isNone(function() {}); // false
```
@method isNone
@static
@for @ember/utils
@param {Object} obj Value to test
@return {Boolean}
@public
*/
function isNone(obj) {
return obj === null || obj === undefined;
}
export { isNone as default };