mirror of
https://github.com/flynx/colors.js.git
synced 2026-01-08 19:51:20 +00:00
parent
4b2ae6c5ec
commit
adf06f0988
@ -48,7 +48,9 @@ var addProperty = function (color, func) {
|
|||||||
exports[color] = function (str) {
|
exports[color] = function (str) {
|
||||||
return func.apply(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
|
// don't summon zalgo
|
||||||
addProperty('zalgo', function () {
|
addProperty('zalgo', function () {
|
||||||
return zalgo(this);
|
return zalgo(this);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user