Socket
Socket
Sign inDemoInstall

power-assert-util-string-width

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    power-assert-util-string-width

calculates width of given string


Version published
Weekly downloads
128K
increased by1.59%
Maintainers
1
Install size
18.4 kB
Created
Weekly downloads
 

Changelog

Source

1.2.0 (2018-06-12)

Features
Breaking Changes

Readme

Source

power-assert

Build Status NPM version License

Calculates width of given string. Treat ambiguous-width characters as fullwidth (= 2) by default.

USAGE

var stringWidth = require('power-assert-util-string-width');
stringWidth('abcde'); //=> 5
stringWidth('あいうえお'); //=> 10
stringWidth('アイウエオ'); //=> 5
stringWidth('※脚注');  //=> 6
// stringWidth.narrow treats ambiguous-width characters as narrow (= `1`)
stringWidth.narrow('※脚注');  //=> 5

INSTALL

$ npm install --save-dev power-assert-util-string-width

AUTHOR

LICENSE

Licensed under the MIT license.

Keywords

FAQs

Last updated on 12 Jun 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc