Files
lodash/_baseCastArrayLikeObject.js
John-David Dalton ce0b51888c Bump to v4.7.0.
2016-03-31 00:36:47 -07:00

15 lines
384 B
JavaScript

import isArrayLikeObject from './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 baseCastArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
export default baseCastArrayLikeObject;