Skip to content

Commit

Permalink
debugger: avoid non-ASCII char in code file
Browse files Browse the repository at this point in the history
Avoid non-ASCII char in lib code as a single non-ASCII char forces all
the chars to be stored inefficiently, bloating the binary size. This
also brings the file closer to compatibility with our lint rules.

PR-URL: nodejs#38529
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and aduh95 committed Jul 20, 2021
1 parent 6ad28e0 commit 64046b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/internal/inspector/inspect_repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ function createRepl(inspector) {

[util.inspect.custom](depth, { stylize }) {
const { startTime, endTime } = this.data;
return stylize(`[Profile ${endTime - startTime}μs]`, 'special');
return stylize(
`[Profile ${endTime - startTime}${String.fromCharCode(956)}s]`,
'special'
);
}

save(filename = 'node.cpuprofile') {
Expand Down

0 comments on commit 64046b9

Please sign in to comment.