Marak / colors.js

get colors in your node.js console
https://github.com/Marak/colors.js
Other
5.17k stars 446 forks source link

String.prototype.bold not compatible with ES6 #110

Closed panuhorsmalahti closed 6 years ago

panuhorsmalahti commented 9 years ago

ES6 brings String.prototype.bold to wrap string to bold tags: https://javascript.spec.whatwg.org/#string.prototype.bold

However, colors.js also wants to use that property. I recommend renaming the .bold property to something else.

plantain-00 commented 8 years ago

+1

richardsimko commented 8 years ago

+1 this breaks compatibility with ES6

texastoland commented 8 years ago

It looks deprecated?

DABH commented 6 years ago

ES6 deprecates that though... so, is there a way to keep the name bold in colors while not causing conflicts with the prototype method? Ideas welcome. Would be great to not have to change the colors API, especially for a deprecated function. Note this should only be an issue outside safe mode for colors.

DABH commented 6 years ago

I'm closing this as a duplicate of #168 , but this isn't solved yet, so really encourage discussion on that issue. Would be great to find a workaround^^