MCPcopy
hub / github.com/lodash/lodash / castArrayLikeObject

Function castArrayLikeObject

lodash.js:4525–4527  ·  view source on GitHub ↗

* Casts `value` to an empty array if it's not an array like object. * * @private * @param {*} value The value to inspect. * @returns {Array|Object} Returns the cast array-like object.

(value)

Source from the content-addressed store, hash-verified

4523 * @returns {Array|Object} Returns the cast array-like object.
4524 */
4525 function castArrayLikeObject(value) {
4526 return isArrayLikeObject(value) ? value : [];
4527 }
4528
4529 /**
4530 * Casts `value` to `identity` if it's not a function.

Callers

nothing calls this directly

Calls 1

isArrayLikeObjectFunction · 0.85

Tested by

no test coverage detected