Revised Function.prototype.toStringPublished 25 March 2018 · Tagged with ECMAScript ES2019Function.prototype.toString() now returns exact slices of source code text, including whitespace and comments. Here’s an example comparing the old and the new behavior:// Note the comment between the `function` keyword// and the function name, as well as the space following// the function name.function /* a comment */ foo () {}// Previously, in V8:foo.toString();// → 'function foo() {}'// ^ no comment// ^ no space// Now:foo.toString();// → 'function /* comment */ foo () {}'Feature support #Chrome: supported since version 66Firefox: supportedSafari: no supportNode.js: supported since version 8Babel: no supportabout this feature support listing