Files
lodash/_baseCastArrayLikeObject.js
John-David Dalton ce259221bd Bump to v4.4.0.
2016-02-15 20:20:54 -08:00

16 lines
399 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} Returns the array-like object.
*/
function baseCastArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
return baseCastArrayLikeObject;
});