Files
lodash/_baseCastArrayLikeObject.js
John-David Dalton 94ba2e24e8 Bump to v4.4.0.
2016-02-15 20:25:07 -08:00

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