mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-29 02:50:10 +00:00
parent
4b2ae6c5ec
commit
adf06f0988
@ -48,7 +48,9 @@ var addProperty = function (color, func) {
|
||||
exports[color] = function (str) {
|
||||
return func.apply(str);
|
||||
};
|
||||
String.prototype.__defineGetter__(color, func);
|
||||
Object.defineProperty(String.prototype, color, {
|
||||
get: func
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -301,4 +303,4 @@ function zalgo(text, options) {
|
||||
// don't summon zalgo
|
||||
addProperty('zalgo', function () {
|
||||
return zalgo(this);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user