string-width
Advanced tools
+3
-3
@@ -17,8 +17,8 @@ 'use strict'; | ||
| // ignore control characters | ||
| if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { | ||
| // Ignore control characters | ||
| if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { | ||
| continue; | ||
| } | ||
| // surrogates | ||
| // Surrogates | ||
| if (code >= 0x10000) { | ||
@@ -25,0 +25,0 @@ i++; |
+2
-5
| { | ||
| "name": "string-width", | ||
| "version": "2.0.0", | ||
| "version": "2.1.0", | ||
| "description": "Get the visual width of a string - the number of columns required to display it", | ||
@@ -49,3 +49,3 @@ "license": "MIT", | ||
| "is-fullwidth-code-point": "^2.0.0", | ||
| "strip-ansi": "^3.0.0" | ||
| "strip-ansi": "^4.0.0" | ||
| }, | ||
@@ -55,6 +55,3 @@ "devDependencies": { | ||
| "xo": "*" | ||
| }, | ||
| "xo": { | ||
| "esnext": true | ||
| } | ||
| } |
+2
-2
@@ -5,3 +5,3 @@ # string-width [](https://travis-ci.org/sindresorhus/string-width) | ||
| Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. | ||
| Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. | ||
@@ -14,3 +14,3 @@ Useful to be able to measure the actual width of command-line output. | ||
| ``` | ||
| $ npm install --save string-width | ||
| $ npm install string-width | ||
| ``` | ||
@@ -17,0 +17,0 @@ |
Sorry, the diff of this file is not supported yet
3817
-1.29%+ Added
+ Added
- Removed
- Removed
Updated