mirror of
https://github.com/flynx/colors.js.git
synced 2026-01-26 05:05:35 +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
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user