Sha256: f9de38be6082edf36e52b5ddfd744a748573fecd85d4e9067699f8e41ca18c4a

Contents?: true

Size: 617 Bytes

Versions: 3

Compression:

Stored size: 617 Bytes

Contents

/**
 @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();              // true
  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
*/
export default function isNone(obj) {
    return obj === null || obj === undefined;
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/es/@ember/-internals/metal/lib/is_none.js
discourse-ember-source-3.5.1.1 dist/es/ember-metal/lib/is_none.js
discourse-ember-source-3.5.1.0 dist/dist/es/ember-metal/lib/is_none.js