keys.js (344B)
1import hasOwnProp from './has-own-prop'; 2 3var keys; 4 5if (Object.keys) { 6 keys = Object.keys; 7} else { 8 keys = function (obj) { 9 var i, 10 res = []; 11 for (i in obj) { 12 if (hasOwnProp(obj, i)) { 13 res.push(i); 14 } 15 } 16 return res; 17 }; 18} 19 20export { keys as default };