mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
`manage_node_deps.py` was changed in https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2259834 to add line endings at the end of the package.json file However, `npm run install-deps` was not rerun to add the line endings. To prevent future CLs that add deps to include the line ending changes, fix them in this CL. R=mathias@chromium.org Change-Id: Id4ee0003520c4aa0cb55494cdf64df57e31a86d7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2263952 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org>
string-width 
Get the visual width of a string - the number of columns required to display it
Some Unicode characters are fullwidth and use double the normal width. ANSI escape codes are stripped and doesn't affect the width.
Useful to be able to measure the actual width of command-line output.
Install
$ npm install string-width
Usage
const stringWidth = require('string-width');
stringWidth('古');
//=> 2
stringWidth('\u001b[1m古\u001b[22m');
//=> 2
stringWidth('a');
//=> 1
Related
- string-width-cli - CLI for this module
- string-length - Get the real length of a string
- widest-line - Get the visual width of the widest line in a string
License
MIT © Sindre Sorhus