DABH/colors.js

Use Object.defineProperty method instead of __defineGetter__

rilysh opened this issue · 0 comments

String.prototype.__defineGetter__(color, func);

As we know that prototype.__defineGetter__ was been deprecated. Currently it's on legacy version. By using Object.defineProperty with a getter function can be much more better than __defineGetter__.