string-length

WebJar for string-length

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

string-length
Последняя версия

Последняя версия

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

string-length
WebJar for string-length
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/sindresorhus/string-length

Скачать string-length

Как подключить последнюю версию

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : astral-regex jar [1.0.0,2)
org.webjars.npm : strip-ansi jar [4.0.0,5)

Модули Проекта

Данный проект не имеет модулей.

string-length Build Status

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

String#length erroneously counts astral symbols as two characters.

Install

$ npm install string-length

Usage

const stringLength = require('string-length');

'🐴'.length;
//=> 2

stringLength('🐴');
//=> 1

stringLength('\u001B[1municorn\u001B[22m');
//=> 7

Related


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Версии библиотеки

Версия
2.0.0
1.0.1
1.0.0
0.1.2