mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
357 B
15 lines
357 B
9 years ago
|
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;
|