Function
isNone (obj) Boolean public
Module:
@ember/utils
Defined in packages/@ember/-internals/metal/lib/is_none.ts:4
import { isNone } from '@ember/utils'; |
- obj
- Object
- Value to test
- returns
- Boolean
Returns true if the passed value is null or undefined. This avoids errors from JSLint complaining about use of ==, which can be technically confusing.
1 2 3 4 5 |
isNone(null); // true isNone(undefined); // true isNone(''); // false isNone([]); // false isNone(function() {}); // false |