The value to check.
true if the check passes, false otherwise.
This is useful for checking that the prototype of an array has not been
modified. However, this will return false for arrays created in other
realms since they will have a different prototype.
isPlainArray([]) // true
isPlainArray(new Array()) // true
isPlainArray(new Uint16Array()) // false
isPlainArray(Object.create(Array.prototype)) // false
isPlainArray(Object.create(null)) // false
isPlainArray(null) // false
Comparison with Array.isArray:
class MyArray extends Array {}
Array.isArray(new MyArray()) // true
isPlainArray(new MyArray()) // false
Generated using TypeDoc
Checks if a value passes
Array.isArrayand has prototypeArray.prototype.