Files
lodash/internal/toArrayLikeObject.js
John-David Dalton 54e7baecc3 Bump to v4.0.0.
2016-01-12 00:17:29 -08:00

15 lines
353 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;