mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-30 06:57:49 +00:00
16 lines
380 B
JavaScript
16 lines
380 B
JavaScript
define(['../isArrayLikeObject'], function(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 : [];
|
|
}
|
|
|
|
return toArrayLikeObject;
|
|
});
|