widest-line

WebJar for widest-line

License

License

MIT
Categories

Categories

IDE Development Tools
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

widest-line
Last Version

Last Version

3.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

widest-line
WebJar for widest-line
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/widest-line

Download widest-line

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/widest-line/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>widest-line</artifactId>
    <version>3.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/widest-line/
implementation 'org.webjars.npm:widest-line:3.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/widest-line/
implementation ("org.webjars.npm:widest-line:3.1.0")
'org.webjars.npm:widest-line:jar:3.1.0'
<dependency org="org.webjars.npm" name="widest-line" rev="3.1.0">
  <artifact name="widest-line" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='widest-line', version='3.1.0')
)
libraryDependencies += "org.webjars.npm" % "widest-line" % "3.1.0"
[org.webjars.npm/widest-line "3.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : string-width jar [4.0.0,5)

Project Modules

There are no modules declared in this project.

widest-line Build Status

Get the visual width of the widest line in a string - the number of columns required to display it

Some Unicode characters are fullwidth and use double the normal width. ANSI escape codes are stripped and doesn't affect the width.

Useful to be able to know the maximum width a string will take up in the terminal.

Install

$ npm install widest-line

Usage

const widestLine = require('widest-line');

widestLine('古\n\u001B[1m@\u001B[22m');
//=> 2

Related

License

MIT © Sindre Sorhus

Versions

Version
3.1.0
2.0.1
2.0.0
1.0.0