var.isArray

bool isArray() @property const nothrow @nogc pure @safe

Check if this value is an array (Type.ARRAY).

More readable alternative to v.type == var.Type.ARRAY.

Returns

true if the value is an array, false otherwise.

Examples

var a = var([1, 2, 3]);
assert(a.isArray);
var i = 42;
assert(!i.isArray);