Files
lodash/_baseCastArrayLikeObject.js
John-David Dalton 91d3468c81 Bump to v4.4.0.
2016-02-15 23:05:17 -08:00

15 lines
377 B
JavaScript

var isArrayLikeObject = require('./isArrayLikeObject');
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array} Returns the array-like object.
*/
function baseCastArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
module.exports = baseCastArrayLikeObject;