Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

widest-line

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

widest-line

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

    4.0.1latest

Version published
Maintainers
1
Weekly downloads
13,688,814
decreased by-11.94%

Weekly downloads

Changelog

Source

  • Update dependencies 554a64d

https://github.com/sindresorhus/widest-line/compare/v4.0.0...v4.0.1

Readme

Source

widest-line

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

import widestLine from 'widest-line'; widestLine('古\n\u001B[[email protected]\u001B[22m'); //=> 2

Keywords

FAQs

What is widest-line?

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

Is widest-line popular?

The npm package widest-line receives a total of 10,991,950 weekly downloads. As such, widest-line popularity was classified as popular.

Is widest-line well maintained?

We found that widest-line demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 12 Oct 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc