Ramu.Utils.isEmpty - HermesPasser/Ramu GitHub Wiki
static bool
Ramu.Utils.isEmpty(obj)
Parameters
Object
obj: Object to be checked.
Return
bool
: Return true if the object is empty and false if not.
Description
Checks if the object is empty.
You can test this snippet of code here.
const o = {};
if (Ramu.Utils.isEmpty(o)){
new Text('o is empty', 1, 10, 100);
} else {
new Text('o is not', 1, 10, 100);
}
const o2 = { item: "value" };
if (Ramu.Utils.isEmpty(o2)){
new Text('o2 is empty', 1, 50, 100);
} else {
new Text('o2 is not', 1, 50, 100);
}