Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

18
node_modules/string-width/index.js generated vendored
View File

@@ -1,21 +1,21 @@
'use strict';
const stripAnsi = require('strip-ansi');
const isFullwidthCodePoint = require('is-fullwidth-code-point');
const emojiRegex = require('emoji-regex')();
const emojiRegex = require('emoji-regex');
module.exports = input => {
input = input.replace(emojiRegex, ' ');
const stringWidth = string => {
string = string.replace(emojiRegex(), ' ');
if (typeof input !== 'string' || input.length === 0) {
if (typeof string !== 'string' || string.length === 0) {
return 0;
}
input = stripAnsi(input);
string = stripAnsi(string);
let width = 0;
for (let i = 0; i < input.length; i++) {
const code = input.codePointAt(i);
for (let i = 0; i < string.length; i++) {
const code = string.codePointAt(i);
// Ignore control characters
if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
@@ -37,3 +37,7 @@ module.exports = input => {
return width;
};
module.exports = stringWidth;
// TODO: remove this in the next major version
module.exports.default = stringWidth;