mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Bump to v4.1.0.
This commit is contained in:
14
_toArrayLikeObject.js
Normal file
14
_toArrayLikeObject.js
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user