Nodejs Array Type Check isarray(a)

Here you can find the source of isarray(a)

Method Source Code

function isarray(a)
{
    return typeof a == 'object' &&
        typeof a.length == 'number' &&
        isFinite(a.length) &&
        a.length == Math.floor(a.length)
}

Related

  1. isArray(input)
    function isArray(input) {
        return Object.prototype.toString.call(input) === '[object Array]';
    
  2. isArray(n)
    function isArray(n) {
       return n instanceof Array;
    
  3. isArray(o)
    function isArray(o) {
      return Object.prototype.toString.call(o) === '[object Array]';
    
  4. isarray(e)
    function isarray(e) {
      return (e.length && typeof e !== "string");