isEmpty (obj) Boolean
public
Verifies that a value is null
or an empty string, empty array, or empty function.
Constrains the rules on Ember.isNone
by returning true for empty string and empty arrays.
1 2 3 4 5 6 7 8 9 10 | Ember.isEmpty(); // true Ember.isEmpty( null ); // true Ember.isEmpty(undefined); // true Ember.isEmpty( '' ); // true Ember.isEmpty([]); // true Ember.isEmpty({}); // false Ember.isEmpty( 'Adam Hawkins' ); // false Ember.isEmpty([0,1,2]); // false Ember.isEmpty( '\n\t' ); // false Ember.isEmpty( ' ' ); // false |
Parameters:
-
obj
Object
- Value to test
Returns:
-
Boolean
Please login to continue.