My punt: Compilers and transpilers are both translators, and the only meaningful difference is whether the output is meant to be easily edited by a human, which is a spectrum more than a hard dividing line. The p2c Pascal to C translator [1] is pretty clearly a transpiler in that the C it outputs is pretty readable, the Stalin Scheme to C translator [2] is more clearly a compiler in that its output, even though it's C, is not human-readable unless you're a very dedicated type of person.
So, where does BabelJS sit? Somewhere in between, depending on what language features you used in the input code. Obviously generators require heavy transformations, but other features don't.
[1] https://github.com/FranklinChen/p2c
[2] https://en.wikipedia.org/wiki/Stalin_%28Scheme_implementatio...
So, where does BabelJS sit? Somewhere in between, depending on what language features you used in the input code. Obviously generators require heavy transformations, but other features don't.