mirror of https://github.com/lukechilds/node.git
Browse Source
The internal function `truncate()` is only called with the first argument being the output of `util.inspect()`. `util.inspect()` calls its own internal `formatValue()` which is guaranteed to return a string. Therefore, we can remove the check in `truncate()` that the first argument is a string as well as code to handle the case where it is not a string. PR-URL: https://github.com/nodejs/node/pull/8132 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Alexander Makarenko <estliberitas@gmail.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>v6.x
committed by
Evan Lucas
1 changed files with 1 additions and 5 deletions
Loading…
Reference in new issue