Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Object.keys(object) -> Array of String
- *
- * List the keys that belongs only to the given object.
- **/
- (function() {
- function list_keys(object) {
- var prop
- , keys = [];
- for (prop in object) {
- object.hasOwnProperty(prop) && keys.push(prop);
- }
- return keys;
- }
- Object.keys || (Object.keys = list_keys)
- }());
Add Comment
Please, Sign In to add comment