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

allKeys.js 423B

123456789101112131415
  1. define(['./isObject', './_setup', './_collectNonEnumProps'], function (isObject, _setup, _collectNonEnumProps) {
  2. // Retrieve all the enumerable property names of an object.
  3. function allKeys(obj) {
  4. if (!isObject(obj)) return [];
  5. var keys = [];
  6. for (var key in obj) keys.push(key);
  7. // Ahem, IE < 9.
  8. if (_setup.hasEnumBug) _collectNonEnumProps(obj, keys);
  9. return keys;
  10. }
  11. return allKeys;
  12. });