isEmpty
isEmpty(
params):boolean
Defined in: objects/is-empty/index.ts:23
Checks if a value is empty.
A value is considered empty if it is: null, undefined, an empty string,
an empty array, an empty Map, an empty Set, or a plain object with no own
enumerable properties.
Parameters
Section titled “Parameters”params
Section titled “params”IsEmptyParams
The parameters object
Returns
Section titled “Returns”boolean
true if the value is empty, false otherwise
Example
Section titled “Example”isEmpty({ value: {} }); // => trueisEmpty({ value: "" }); // => trueisEmpty({ value: [1] }); // => falseKeywords
Section titled “Keywords”is empty, is blank, has value, null check, empty check