string-width
Advanced tools
+5
-1
@@ -7,5 +7,9 @@ 'use strict'; | ||
| const stringWidth = string => { | ||
| if (typeof string !== 'string' || string.length === 0) { | ||
| return 0; | ||
| } | ||
| string = string.replace(emojiRegex(), ' '); | ||
| if (typeof string !== 'string' || string.length === 0) { | ||
| if (string.length === 0) { | ||
| return 0; | ||
@@ -12,0 +16,0 @@ } |
+1
-1
| { | ||
| "name": "string-width", | ||
| "version": "4.2.0", | ||
| "version": "4.2.1", | ||
| "description": "Get the visual width of a string - the number of columns required to display it", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+1
-1
@@ -1,2 +0,2 @@ | ||
| # string-width [](https://travis-ci.org/sindresorhus/string-width) | ||
| # string-width | ||
@@ -3,0 +3,0 @@ > Get the visual width of a string - the number of columns required to display it |
57
5.56%5161
-1.71%