Files
lodash/_toArrayLikeObject.js
John-David Dalton 466c67a8b6 Bump to v4.1.0.
2016-01-29 01:20:57 -08:00

15 lines
352 B
JavaScript

import isArrayLikeObject from './isArrayLikeObject';
/**
* Converts `value` to an array-like object if it's not one.
*
* @private
* @param {*} value The value to process.
* @returns {Array} Returns the array-like object.
*/
function toArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
export default toArrayLikeObject;