Files
lodash/_castArrayLikeObject.js
John-David Dalton 76b289fe6e Bump to v4.10.0.
2016-04-10 22:53:08 -07:00

16 lines
403 B
JavaScript

define(['./isArrayLikeObject'], function(isArrayLikeObject) {
/**
* 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.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
return castArrayLikeObject;
});