[fix] Removed Object.define property entirely

This commit is contained in:
Marak 2013-08-21 16:15:05 -07:00
parent c0bc636d4d
commit 38db25ad14

View File

@ -48,20 +48,9 @@ var addProperty = function (color, func) {
exports[color] = function (str) {
return func.apply(str);
};
if (Object.defineProperty) {
Object.defineProperty(String.prototype, color, {
get : func,
configurable: true,
enumerable: false
});
} else {
String.prototype.__defineGetter__(color, func);
}
String.prototype.__defineGetter__(color, func);
};
function stylize(str, style) {
var styles;