Ember.isPresent()

isPresent (obj) Booleanpublic

Defined in packages/ember-metal/lib/is_present.js:3
Available since 1.8.0

A value is present if it not isBlank.

Ember.isPresent();                // false
Ember.isPresent(null);            // false
Ember.isPresent(undefined);       // false
Ember.isPresent('');              // false
Ember.isPresent('  ');            // false
Ember.isPresent('\n\t');          // false
Ember.isPresent([]);              // false
Ember.isPresent({ length: 0 })    // false
Ember.isPresent(false);           // true
Ember.isPresent(true);            // true
Ember.isPresent('string');        // true
Ember.isPresent(0);               // true
Ember.isPresent(function() {})    // true
Ember.isPresent({});              // true
Ember.isPresent(false);           // true
Ember.isPresent('\n\t Hello');    // true
Ember.isPresent([1,2,3]);         // true

Parameters:

obj Object
Value to test

Returns:

Boolean
doc_EmberJs
2016-11-30 16:51:33
Comments
Leave a Comment

Please login to continue.