true if the value is empty, false otherwise.bool empty() @property const @safeCheck if this value is empty.
A value is considered empty if:
Type.NULLType.STRING with length 0Type.ARRAY with length 0Type.OBJECT with no keysScalar types (numbers, booleans, characters) are never considered empty.
true if the value is empty, false otherwise.var n;
assert(n.empty); // NULL is empty
var s = "";
assert(s.empty); // empty string
var a = var.makeArray();
assert(a.empty); // empty array
var obj = var.makeObject();
assert(obj.empty); // empty object
var i = 42;
assert(!i.empty); // scalars are not empty