MCPcopy
hub / github.com/jashkenas/underscore / createSizePropertyCheck

Function createSizePropertyCheck

underscore-node-f.cjs:207–212  ·  view source on GitHub ↗
(getSizeProperty)

Source from the content-addressed store, hash-verified

205
206// Common internal logic for `isArrayLike` and `isBufferLike`.
207function createSizePropertyCheck(getSizeProperty) {
208 return function(collection) {
209 var sizeProperty = getSizeProperty(collection);
210 return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
211 }
212}
213
214// Internal helper to generate a function to obtain property `key` from `obj`.
215function shallowProperty(key) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…