# unicode-length

> Get the length of unicode strings

Latest version **2.1.0** (published 2022-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install unicode-length
pnpm add unicode-length
yarn add unicode-length
bun add unicode-length
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2022-08-12 |
| First published | 2015-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Juan Cruz Viotti |
| Maintainers | jviotti |
| Keywords | unicode, string, length |

## Links

- npm: https://www.npmjs.com/package/unicode-length
- Repository: https://github.com/jviotti/unicode-length
- Issues: https://github.com/jviotti/unicode-length/issues
- npm.io page: https://npm.io/package/unicode-length

## Dependencies (1)

- [punycode](https://npm.io/package/punycode.md) ^2.0.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2022-08-12
- 2.0.2 — 2019-05-30
- 2.0.1 — 2017-08-07
- 2.0.0 — 2016-08-24
- 1.0.3 — 2016-08-24
- 1.0.2 — 2016-08-16
- 1.0.1 — 2016-07-19
- 1.0.0 — 2015-04-27

## README

unicode-length
--------------

[![npm version](https://badge.fury.io/js/unicode-length.svg)](http://badge.fury.io/js/unicode-length)
[![dependencies](https://david-dm.org/jviotti/unicode-length.png)](https://david-dm.org/jviotti/unicode-length.png)
[![Build Status](https://travis-ci.org/jviotti/unicode-length.svg?branch=master)](https://travis-ci.org/jviotti/unicode-length)

Installation
------------

Install `unicode-length` by running:

```sh
$ npm install --save unicode-length
```

Documentation
-------------

### Number unicodeLength.get(String input)

Get the length of a unicode string.

Example:

```coffee
unicodeLength = require('unicode-length')
console.log(unicodeLength.get('汉字'))
# Outputs 2
```

Tests
-----

Run the test suite by doing:

```sh
$ gulp test
```

Contribute
----------

- Issue Tracker: [github.com/jviotti/unicode-length/issues](https://github.com/jviotti/unicode-length/issues)
- Source Code: [github.com/jviotti/unicode-length](https://github.com/jviotti/unicode-length)

Before submitting a PR, please make sure that you include tests, and that [coffeelint](http://www.coffeelint.org/) runs without any warning:

```sh
$ gulp lint
```

Support
-------

If you're having any problem, please [raise an issue](https://github.com/jviotti/unicode-length/issues/new) on GitHub.

License
-------

The project is licensed under the MIT license.

---
_Source: https://npm.io/package/unicode-length · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
