MCPcopy
hub / github.com/vercel/hyper / castArrayLikeObject

Function castArrayLikeObject

bin/yarn-standalone.js:12174–12176  ·  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

12172 * @returns {Array|Object} Returns the cast array-like object.
12173 */
12174 function castArrayLikeObject(value) {
12175 return isArrayLikeObject(value) ? value : [];
12176 }
12177
12178 /**
12179 * 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