Sha256: 08f234e8871dacf59e1f194fd83c11d002d8d4d488f7be138900755e3e637a24

Contents?: true

Size: 792 Bytes

Versions: 199

Compression:

Stored size: 792 Bytes

Contents

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;

Version data entries

199 entries across 110 versions & 7 rubygems

Version Path
appmap-0.64.0 ./node_modules/string-width/index.d.ts
appmap-0.63.0 ./node_modules/string-width/index.d.ts
appmap-0.62.1 ./node_modules/string-width/index.d.ts
trusty-cms-4.3.3 node_modules/string-width/index.d.ts
trusty-cms-4.3.2 node_modules/string-width/index.d.ts
trusty-cms-4.3.1 node_modules/string-width/index.d.ts
trusty-cms-4.3 node_modules/string-width/index.d.ts
trusty-cms-4.2.3 node_modules/string-width/index.d.ts
epuber-stylus-source-0.54.8 vendor/node_modules/wrap-ansi/node_modules/string-width/index.d.ts
epuber-stylus-source-0.54.8 vendor/node_modules/cliui/node_modules/string-width/index.d.ts
epuber-stylus-source-0.54.8 vendor/node_modules/yargs/node_modules/string-width/index.d.ts
trusty-cms-4.2.2 node_modules/string-width/index.d.ts
trusty-cms-4.2.1 node_modules/string-width/index.d.ts
trusty-cms-4.2 node_modules/string-width/index.d.ts
trusty-cms-4.1.9 node_modules/string-width/index.d.ts
trusty-cms-4.1.8 node_modules/string-width/index.d.ts
trusty-cms-4.1.7 node_modules/string-width/index.d.ts
trusty-cms-4.1.6 node_modules/string-width/index.d.ts
trusty-cms-4.1.5 node_modules/string-width/index.d.ts