MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / toArray

Function toArray

MathBox/mathbox-bundle.js:39196–39201  ·  view source on GitHub ↗

* Converts the `collection` to an array. * * @static * @memberOf _ * @category Collections * @param {Array|Object|string} collection The collection to convert. * @returns {Array} Returns the new converted array. * @example * * (function() { return _.toArr

(collection)

Source from the content-addressed store, hash-verified

39194 * // => [2, 3, 4]
39195 */
39196 function toArray(collection) {
39197 if (collection && typeof collection.length == 'number') {
39198 return slice(collection);
39199 }
39200 return values(collection);
39201 }
39202
39203 /**
39204 * Performs a deep comparison of each element in a `collection` to the given

Callers

nothing calls this directly

Calls 2

sliceFunction · 0.85
valuesFunction · 0.85

Tested by

no test coverage detected