-
This might well be by design, but I want to verify that my approach to resolving it is correct. This pair of lines does not work because
To remedy this I have done the following (which ESLint disapproves of because I never use the
This loads the So is this by design, or is it something that should be "fixed" or maybe noted in docs somewhere? Is my approach to making it work the right way to go, at least for the moment? Of course I'm not just getting the |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
If |
Beta Was this translation helpful? Give feedback.
-
During the lunch break a better approach occurred to me:
That way I don't need to maintain my own list of spaces, something I had been hoping to avoid. I hadn't examined I'm answering this question with this comment. Please feel free to comment regardless. I'm curious about why the registry is initialized separately from |
Beta Was this translation helpful? Give feedback.
-
That said, this is a good idea, I think:
|
Beta Was this translation helpful? Give feedback.
-
Easy enough to create a PR and insert that line in the module. Let me know and I can submit that. IMO it's a good idea, but how will anyone know to use it unless there is documentation somewhere that explains it? Certainly it does no harm, and this Q&A is in the historical record. Thanks for the tip on "import for side effects". |
Beta Was this translation helpful? Give feedback.
During the lunch break a better approach occurred to me:
That way I don't need to maintain my own list of spaces, something I had been hoping to avoid. I hadn't examined
spaces/index.js
until now, so I didn't realize that it was the module that exported the full catalog of color spaces.I'm answering this question with this comment. Please feel free to comment regardless. I'm curious about why the registry is initialized separately from
ColorSpace
.