Skip to content

Commit

Permalink
fix(prototype): smaller proto
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkaron committed Oct 16, 2016
1 parent f94f556 commit d8b5262
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
}));
}
})([], this, function () {
function p(proto) {
function f() {};
f.prototype = proto;
return new f();
}
function proto() {};

return function (result, data) {
if (data.key === "proto") {
result.prototype = p(data.value);
proto.prototype = data.value;
result.prototype = new proto();
}
else if (data.key === "prototype") {
result.prototype = data.value;
Expand Down

0 comments on commit d8b5262

Please sign in to comment.