setup-php/node_modules/lodash/_castArrayLikeObject.js
Shivam Mathur 8f9786b73f init
2019-09-06 05:17:43 +05:30

15 lines
381 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|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
module.exports = castArrayLikeObject;