Skip to content

Commit

Permalink
Group unconditional Object shims together.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 2, 2014
1 parent 9a60512 commit 31683c8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,14 @@
});
},

getOwnPropertyKeys: function(subject) {
return Object.keys(subject);
},

is: function(a, b) {
return ES.SameValue(a, b);
},

// 19.1.3.9
// shim from https://gist.github.com/WebReflection/5593554
setPrototypeOf: (function(Object, magic) {
Expand Down Expand Up @@ -867,16 +875,6 @@
})();
}

defineProperties(Object, {
getOwnPropertyKeys: function(subject) {
return Object.keys(subject);
},

is: function(a, b) {
return ES.SameValue(a, b);
}
});

try {
Object.keys('foo');
} catch (e) {
Expand Down

0 comments on commit 31683c8

Please sign in to comment.