In general, you probably want to avoid putting CSS directly into your Javascript. However, there are times when it is unavoidable, or simply not worth the time. I made this tool for myself, for those times when I simply need to paste in a block of CSS into JS code as a string literal, while preserving (or removing) formatting.
Just paste your CSS into the left panel, and then copy the generated JS from the right side.