MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / isArrayLike

Function isArrayLike

public/javascripts/underscore.js:137–140  ·  view source on GitHub ↗
(collection)

Source from the content-addressed store, hash-verified

135 var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
136 var getLength = property('length');
137 var isArrayLike = function(collection) {
138 var length = getLength(collection);
139 return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
140 };
141
142 // Collection Functions
143 // --------------------

Callers 3

underscore.jsFile · 0.70
createReduceFunction · 0.70
flattenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected