make class methods unenumerable - fixes #41

This commit is contained in:
Sebastian McKenzie
2014-10-11 11:49:03 +11:00
parent 1bf0bf4ec1
commit a40cbc2cee
5 changed files with 79 additions and 70 deletions

View File

@@ -1,8 +1,13 @@
var Test = function () {
function Test() {
}
Test.prototype.test = function () {
return 5 + 5;
};
Object.defineProperties(Test.prototype, {
test: {
writeable: true,
value: function () {
return 5 + 5;
}
}
});
return Test;
}();