Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

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
14,028,145
decreased by-4.34%

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 11,345,906 weekly downloads. As such, widest-line popularity was classified as popular.

Is widest-line well maintained?

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

Last updated on 12 Oct 2021
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