Skip to content

Commit

Permalink
Update __rest emit to handle symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
sandersn committed Nov 16, 2016
1 parent 177a35e commit 3e929fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tslib.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ export const __assign = Object.assign || function (t) {

export const __rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};

Expand Down
5 changes: 4 additions & 1 deletion tslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ var __generator;

__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && !e.indexOf(p))
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
};

Expand Down

0 comments on commit 3e929fa

Please sign in to comment.