3 ms·
Yep. We used to use this for some hacks back before AST libraries were a thing, mainly because Function.prototype.toString() preserves comments. function foo()
by junon 6y ago
Yep. We used to use this for some hacks back before AST libraries were a thing, mainly because Function.prototype.toString() preserves comments.
function foo() { /* a comment! / }
console.log(foo.toString()); //-> "function foo() { / a comment! */ }"