summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table3/node_modules/string-width
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cli-table3/node_modules/string-width')
-rw-r--r--deps/npm/node_modules/cli-table3/node_modules/string-width/index.d.ts29
-rw-r--r--deps/npm/node_modules/cli-table3/node_modules/string-width/index.js47
-rw-r--r--deps/npm/node_modules/cli-table3/node_modules/string-width/license9
-rw-r--r--deps/npm/node_modules/cli-table3/node_modules/string-width/package.json56
-rw-r--r--deps/npm/node_modules/cli-table3/node_modules/string-width/readme.md50
5 files changed, 0 insertions, 191 deletions
diff --git a/deps/npm/node_modules/cli-table3/node_modules/string-width/index.d.ts b/deps/npm/node_modules/cli-table3/node_modules/string-width/index.d.ts
deleted file mode 100644
index 12b5309751..0000000000
--- a/deps/npm/node_modules/cli-table3/node_modules/string-width/index.d.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-declare const stringWidth: {
- /**
- Get the visual width of a string - the number of columns required to display it.
-
- 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.
-
- @example
- ```
- import stringWidth = require('string-width');
-
- stringWidth('a');
- //=> 1
-
- stringWidth('古');
- //=> 2
-
- stringWidth('\u001B[1m古\u001B[22m');
- //=> 2
- ```
- */
- (string: string): number;
-
- // TODO: remove this in the next major version, refactor the whole definition to:
- // declare function stringWidth(string: string): number;
- // export = stringWidth;
- default: typeof stringWidth;
-}
-
-export = stringWidth;
diff --git a/deps/npm/node_modules/cli-table3/node_modules/string-width/index.js b/deps/npm/node_modules/cli-table3/node_modules/string-width/index.js
deleted file mode 100644
index f4d261a96a..0000000000
--- a/deps/npm/node_modules/cli-table3/node_modules/string-width/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict';
-const stripAnsi = require('strip-ansi');
-const isFullwidthCodePoint = require('is-fullwidth-code-point');
-const emojiRegex = require('emoji-regex');
-
-const stringWidth = string => {
- if (typeof string !== 'string' || string.length === 0) {
- return 0;
- }
-
- string = stripAnsi(string);
-
- if (string.length === 0) {
- return 0;
- }
-
- string = string.replace(emojiRegex(), ' ');
-
- let width = 0;
-
- for (let i = 0; i < string.length; i++) {
- const code = string.codePointAt(i);
-
- // Ignore control characters
- if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
- continue;
- }
-
- // Ignore combining characters
- if (code >= 0x300 && code <= 0x36F) {
- continue;
- }
-
- // Surrogates
- if (code > 0xFFFF) {
- i++;
- }
-
- width += isFullwidthCodePoint(code) ? 2 : 1;
- }
-
- return width;
-};
-
-module.exports = stringWidth;
-// TODO: remove this in the next major version
-module.exports.default = stringWidth;
diff --git a/deps/npm/node_modules/cli-table3/node_modules/string-width/license b/deps/npm/node_modules/cli-table3/node_modules/string-width/license
deleted file mode 100644
index e7af2f7710..0000000000
--- a/deps/npm/node_modules/cli-table3/node_modules/string-width/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/cli-table3/node_modules/string-width/package.json b/deps/npm/node_modules/cli-table3/node_modules/string-width/package.json
deleted file mode 100644
index b9b20caaf6..0000000000
--- a/deps/npm/node_modules/cli-table3/node_modules/string-width/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "string-width",
- "version": "4.2.2",
- "description": "Get the visual width of a string - the number of columns required to display it",
- "license": "MIT",
- "repository": "sindresorhus/string-width",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=8"
- },
- "scripts": {
- "test": "xo && ava && tsd"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "keywords": [
- "string",
- "character",
- "unicode",
- "width",
- "visual",
- "column",
- "columns",
- "fullwidth",
- "full-width",
- "full",
- "ansi",
- "escape",
- "codes",
- "cli",
- "command-line",
- "terminal",
- "console",
- "cjk",
- "chinese",
- "japanese",
- "korean",
- "fixed-width"
- ],
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "devDependencies": {
- "ava": "^1.4.1",
- "tsd": "^0.7.1",
- "xo": "^0.24.0"
- }
-}
diff --git a/deps/npm/node_modules/cli-table3/node_modules/string-width/readme.md b/deps/npm/node_modules/cli-table3/node_modules/string-width/readme.md
deleted file mode 100644
index bdd314129c..0000000000
--- a/deps/npm/node_modules/cli-table3/node_modules/string-width/readme.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# string-width
-
-> Get the visual width of a string - the number of columns required to display it
-
-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.
-
-Useful to be able to measure the actual width of command-line output.
-
-
-## Install
-
-```
-$ npm install string-width
-```
-
-
-## Usage
-
-```js
-const stringWidth = require('string-width');
-
-stringWidth('a');
-//=> 1
-
-stringWidth('古');
-//=> 2
-
-stringWidth('\u001B[1m古\u001B[22m');
-//=> 2
-```
-
-
-## Related
-
-- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
-- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
-- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
-
-
----
-
-<div align="center">
- <b>
- <a href="https://tidelift.com/subscription/pkg/npm-string-width?utm_source=npm-string-width&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
- </b>
- <br>
- <sub>
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
- </sub>
-</div>