Function
isBlank (obj) Boolean public
Module: | @ember/utils |
---|
Defined in packages/ember-metal/lib/is_blank.js:5
Available since v1.5.0
import { isBlank } from '@ember/utils';
- obj
- Object
- Value to test
- returns
- Boolean
A value is blank if it is empty or a whitespace string.
import { isBlank } from '@ember/utils'; isBlank(); // true isBlank(null); // true isBlank(undefined); // true isBlank(''); // true isBlank([]); // true isBlank('\n\t'); // true isBlank(' '); // true isBlank({}); // false isBlank('\n\t Hello'); // false isBlank('Hello world'); // false isBlank([1,2,3]); // false
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/functions/@ember%2Futils/isBlank