Guest User

Untitled

a guest
Jun 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. /**
  2. * Object.keys(object) -> Array of String
  3. *
  4. * List the keys that belongs only to the given object.
  5. **/
  6. (function() {
  7. function list_keys(object) {
  8. var prop
  9. , keys = [];
  10.  
  11. for (prop in object) {
  12. object.hasOwnProperty(prop) && keys.push(prop);
  13. }
  14. return keys;
  15. }
  16.  
  17. Object.keys || (Object.keys = list_keys)
  18. }());
Add Comment
Please, Sign In to add comment