SILENT KILLERPanel

Current Path: > > lib > node_modules > npm > node_modules > string-width >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/node_modules/npm/node_modules/string-width/

NameTypeSizeLast ModifiedActions
node_modules Directory - -
index.js File 649 bytes March 10 2021 14:36:37.
license File 1109 bytes March 10 2021 14:36:37.
package.json File 2124 bytes March 10 2021 14:36:37.
readme.md File 1150 bytes March 10 2021 14:36:37.

Reading File: //lib/node_modules/npm/node_modules/string-width//index.js

'use strict';
const stripAnsi = require('strip-ansi');
const isFullwidthCodePoint = require('is-fullwidth-code-point');

module.exports = str => {
	if (typeof str !== 'string' || str.length === 0) {
		return 0;
	}

	str = stripAnsi(str);

	let width = 0;

	for (let i = 0; i < str.length; i++) {
		const code = str.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;
};

SILENT KILLER Tool