mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
15 lines
357 B
JavaScript
15 lines
357 B
JavaScript
var isArrayLikeObject = require('./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 : [];
|
|
}
|
|
|
|
module.exports = toArrayLikeObject;
|