Files
lodash/_castArrayLikeObject.js
John-David Dalton f10bb8b80b Bump to v4.10.0.
2016-04-10 22:55:59 -07:00

15 lines
376 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 castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
export default castArrayLikeObject;