Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assert: remove code that is never reached
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: #8132 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Alexander Makarenko <[email protected]> Reviewed-By: Yorkie Liu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
- Loading branch information