Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

_castArrayLikeObject.js 381B

1234567891011121314
  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;