Sha256: a785ebc726c994e58c99e11a61e73ffc0de5265c298ea99a7a32d4e33a4e289f
Contents?: true
Size: 404 Bytes
Versions: 21
Compression:
Stored size: 404 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const simple_wcswidth_1 = require("simple-wcswidth"); /* eslint-disable no-control-regex */ const colorRegex = /\x1b\[\d{1,3}m/g; // \x1b[30m \x1b[305m const stripAnsi = (str) => str.replace(colorRegex, ''); const findWidthInConsole = (str) => simple_wcswidth_1.wcswidth(stripAnsi(str)); exports.default = findWidthInConsole;
Version data entries
21 entries across 21 versions & 1 rubygems