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.

19 lines
297 B

  1. /**
  2. * Gets the keys for an object.
  3. *
  4. * @return {Array} keys
  5. * @api private
  6. */
  7. module.exports = Object.keys || function keys (obj){
  8. var arr = [];
  9. var has = Object.prototype.hasOwnProperty;
  10. for (var i in obj) {
  11. if (has.call(obj, i)) {
  12. arr.push(i);
  13. }
  14. }
  15. return arr;
  16. };