fallback on Array when TypedArray is not supported
187516
function computeLinesAndColumns(tokenizer, source) {
    var sourceLength = source.length;
    var start = firstCharOffset(source);
    var lines = tokenizer.lines;
    var line = tokenizer.startLine;
    var columns = tokenizer.columns;
    var column = tokenizer.startColumn;

    if (lines === null || lines.length < sourceLength + 1) {
        lines = new SafeUint32Array(Math.max(sourceLength + 1024, MIN_BUFFER_SIZE));
        columns = new SafeUint32Array(lines.length);
    }

    for (var i = start; i < sourceLength; i++) {
        var code = source.charCodeAt(i);

        lines[i] = line;
        columns[i] = column++;

        if (code === N || code === R || code === F) {
            if (code === R && i + 1 < sourceLength && source.charCodeAt(i + 1) === N) {
                i++;
                lines[i] = line;
                columns[i] = column;
            }

            line++;
            column = 1;
        }
    }

    lines[i] = line;
    columns[i] = column;

    tokenizer.linesAnsColumnsComputed = true;
    tokenizer.lines = lines;
    tokenizer.columns = columns;
}
1278073
def array(description, **kwargs) -> typing.Type:
    
    kwargs['description'] = description
    return type('Array', (Array,), kwargs)
204867
private void arrayFillDefaultValue(Object arr) {
        if (null == arr)
            return;
        Class<?> clas = arr.getClass();
        Class<?> comp = Types.arrayElementType(clas);
        if ( !comp.isPrimitive() )
            if ( Types.arrayDimensions(clas) > 1 )
                for ( int i = 0; i < Array.getLength(arr); i++ )
                    arrayFillDefaultValue(Array.get(arr, i));
            else
                Arrays.fill((Object[]) arr, Primitive.unwrap(
                    Primitive.getDefaultValue(comp)));
    }
768292
def check_dtype(array, allowed):
    
    if not hasattr(allowed, "__iter__"):
        allowed = [allowed,]
    if array.dtype not in allowed:
        raise(TypeError(
            "Invalid dtype {}. Allowed dtype(s): {}".format(array.dtype, allowed)))
982756
private void array(Class<?> type, Object ar, int limit) {
        Class<?> compType;

        compType = type.getComponentType();
        if (compType.equals(Character.TYPE)) {
            charArray((char[]) ar, limit);
        } else {
            nonCharArray(compType, ar, limit);
        }
    }
696978
function applyAllowedRuleToArray( itemsRule, items, validItems ) {
		if ( !itemsRule )
			return false;

		// True means that all elements of array are accepted (the asterix was used for classes).
		if ( itemsRule === true )
			return true;

		for ( var i = 0, l = items.length, item; i < l; ++i ) {
			item = items[ i ];
			if ( !validItems[ item ] )
				validItems[ item ] = itemsRule( item );
		}

		return false;
	}
105541
function firstOrDefault(arr, filter) {
    for (const item of arr) {
        if (filter(item))
            return item;
    }
    return null;
}
612667
function(array, fun) {
      if (!isSeq(array)) throw new TypeError("expected an array as the first argument");

      return _.filter(_.map(array, function(e) {
        return fun(e);
      }), existy);
    }
152526
function(array, fn)
	{
		if (array != null && fn != null)
		{
			for (var i = 0; i < array.length; i++)
			{
				fn(array[i]);
			}
		}
		
		return array;
	}
491871
function mapArray (types) {
  return types.map(function (type) {
    return Array.isArray(type) ? mapArray(type) : map(type)
  })
}
444
function TypedArray (config) {
    const array = this;

    // validate min items
    if (config.hasOwnProperty('minItems') && (!util.isInteger(config.minItems) || config.minItems < 0)) {
        throw Error('Invalid configuration value for property: minItems. Must be an integer that is greater than or equal to zero. Received: ' + config.minItems);
    }
    const minItems = config.hasOwnProperty('minItems') ? config.minItems : 0;

    // validate max items
    if (config.hasOwnProperty('maxItems') && (!util.isInteger(config.maxItems) || config.maxItems < minItems)) {
        throw Error('Invalid configuration value for property: maxItems. Must be an integer that is greater than or equal to the minItems. Received: ' + config.maxItems);
    }

    // validate schema
    if (config.hasOwnProperty('schema')) config.schema = FullyTyped(config.schema);

    // define properties
    Object.defineProperties(array, {

        maxItems: {
            /**
             * @property
             * @name TypedArray#maxItems
             * @type {number}
             */
            value: Math.round(config.maxItems),
            writable: false
        },

        minItems: {
            /**
             * @property
             * @name TypedArray#minItems
             * @type {number}
             */
            value: Math.round(config.minItems),
            writable: false
        },

        schema: {
            /**
             * @property
             * @name TypedArray#schema
             * @type {object}
             */
            value: config.schema,
            writable: false
        },

        uniqueItems: {
            /**
             * @property
             * @name TypedArray#uniqueItems
             * @type {boolean}
             */
            value: !!config.uniqueItems,
            writable: false
        }

    });

    return array;
}
518797
function arrayLikeKeys(value, inherited) {
  var isArr = isArray_1(value),
      isArg = !isArr && isArguments_1(value),
      isBuff = !isArr && !isArg && isBuffer_1(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? _baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty$5.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           _isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}
737238
function cloneTypedArray(typedArray, isDeep) {
  var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
57238
function (n) {
		if (typeof(n) === 'undefined' || isNaN(n)) {
			return [];
		}
		if (typeof ArrayBuffer === 'undefined') {
			// lacking browser support
			var arr = new Array(n);
			for (var i = 0; i < n; i++) {
				arr[i] = 0;
			}
			return arr;
		} else {
			return new Float64Array(n); // typed arrays are faster
		}
	}
492221
function (value, array) {
            if (util.isFn(array.indexOf)) {
                return array.indexOf(value);
            } else {
                return $.inArray(value, array);
            }
        }
860184
public void newarray(TypeMirror type, int count) throws IOException
    {
        if (type.getKind() != TypeKind.ARRAY)
        {
            throw new IllegalArgumentException(type+" is not array");
        }
        ArrayType at = (ArrayType) type;
        iconst(count);
        TypeMirror ct = at.getComponentType();
        switch (ct.getKind())
        {
            case BOOLEAN:
                newarray(T_BOOLEAN);
                break;
            case CHAR:
                newarray(T_CHAR);
                break;
            case FLOAT:
                newarray(T_FLOAT);
                break;
            case DOUBLE:
                newarray(T_DOUBLE);
                break;
            case BYTE:
                newarray(T_BYTE);
                break;
            case SHORT:
                newarray(T_SHORT);
                break;
            case INT:
                newarray(T_INT);
                break;
            case LONG:
                newarray(T_LONG);
                break;
            case DECLARED:
            {
                DeclaredType dt = (DeclaredType) ct;
                int index = subClass.resolveClassIndex((TypeElement)dt.asElement());
                anewarray(index);
            }
                break;
            default:
                throw new IllegalArgumentException(type+" not supported");
        }
    }
13160
function(name, property, value, types) {
  if (!(types instanceof Array)) {
    types = [types];
  }
  if (types.indexOf(typeof value) === -1) {
    debug('%s \'%s\' expected %j got: %j', name, property, types, value);
    throw new Error(name + ' \'' + property + '\' expected one of type(s): \'' +
                    types.join(',') + '\' got type: \'' + typeof value + '\'');
  }
}