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.

14 regels
381 B

4 jaren geleden
  1. var isArrayLikeObject = require('./isArrayLikeObject');
  2. /**
  3. * Casts `value` to an empty array if it's not an array like object.
  4. *
  5. * @private
  6. * @param {*} value The value to inspect.
  7. * @returns {Array|Object} Returns the cast array-like object.
  8. */
  9. function castArrayLikeObject(value) {
  10. return isArrayLikeObject(value) ? value : [];
  11. }
  12. module.exports = castArrayLikeObject;