I don't know much about nodejs or emscripten, but I do know a little about terminal emulation having written a curses implementation a while back.
Is it possible it wasn't nodejs that was interpreting the escape sequences, but really the terminal emulator you were running it in?
I'm guessing emscripten won't interpret escape sequences because the browser it's running in doesn't. If you truly need escape sequences in a browser, you Might be able to find a library that does it - no guarantees.
Good luck.