From 38db25ad14f3499b5d6a4169ee62978f7d06fc6e Mon Sep 17 00:00:00 2001 From: Marak Date: Wed, 21 Aug 2013 16:15:05 -0700 Subject: [PATCH] [fix] Removed Object.define property entirely --- colors.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/colors.js b/colors.js index c830d6a..7a537d8 100644 --- a/colors.js +++ b/colors.js @@ -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;