colors.js icon indicating copy to clipboard operation
colors.js copied to clipboard

Why are string arugments objects not literals?

Open DABH opened this issue 7 years ago • 0 comments

In applyStyle(), the arguments are String objects, not string literals (see https://github.com/Marak/colors.js/commit/7f146faff3e1b24a845587c07745b9ea0b864f62). We should either get to the bottom of why this is the case, or, if possible, make everything string literals. String objects are discouraged and can cause surprising issues (like typeof returning 'object' not 'string').

DABH avatar May 05 '18 01:05 DABH