jjencode for next.
npm install -S @jswork/next-jjencode
import '@jswork/next-jjencode';
const res = nx.jjencode('$', `console.log("Hello, JavaScript" )`, true);
// result
'\"+'+",$=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_$$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++$,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++....
Code released under the MIT license.