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