Interesting. Would you happen to know if there any downsides or upsides to either? To be completely honest, I looked at under which model HighCharts operates and did a similar thing.
It's probable that HighCharts chose CC BY-NC because there has not been a clear legal consensus (much less any sort of case law) on whether proprietary/minified Javascript linking to a GPL'd Javascript library is in violation of the GPL. If you want to prevent that type of use of your library without people paying for a license, then CC BY-NC might be a viable choice.
However, note that, say, an MIT licensed or BSD licensed or Apache licensed project, developed for noncommercial use, would be prevented from using your library for their layout, because then the non-commercialness of the CC BY-NC could "infect" their project and prevent them from using those licenses. For instance, the Highcharts license caused this project to switch to a competing library altogether: https://github.com/sebastianbergmann/php-code-coverage/issue...
In general, there's no good solution, but I personally shy away from CC-licensed code.
(I am not a lawyer, and this should not be construed as legal advice.)
just that the GPL is meant for code and CC isn't so it has special considerations in it that aren't in CC. CC is meant for media like images, video and text.