1 | unicode-length
|
2 | --------------
|
3 |
|
4 | [![npm version](https://badge.fury.io/js/unicode-length.svg)](http://badge.fury.io/js/unicode-length)
|
5 | [![dependencies](https://david-dm.org/jviotti/unicode-length.png)](https://david-dm.org/jviotti/unicode-length.png)
|
6 | [![Build Status](https://travis-ci.org/jviotti/unicode-length.svg?branch=master)](https://travis-ci.org/jviotti/unicode-length)
|
7 |
|
8 | Installation
|
9 | ------------
|
10 |
|
11 | Install `unicode-length` by running:
|
12 |
|
13 | ```sh
|
14 | $ npm install --save unicode-length
|
15 | ```
|
16 |
|
17 | Documentation
|
18 | -------------
|
19 |
|
20 | ### Number unicodeLength.get(String input)
|
21 |
|
22 | Get the length of a unicode string.
|
23 |
|
24 | Example:
|
25 |
|
26 | ```coffee
|
27 | unicodeLength = require('unicode-length')
|
28 | console.log(unicodeLength.get('汉字'))
|
29 | # Outputs 2
|
30 | ```
|
31 |
|
32 | Tests
|
33 | -----
|
34 |
|
35 | Run the test suite by doing:
|
36 |
|
37 | ```sh
|
38 | $ gulp test
|
39 | ```
|
40 |
|
41 | Contribute
|
42 | ----------
|
43 |
|
44 | - Issue Tracker: [github.com/jviotti/unicode-length/issues](https://github.com/jviotti/unicode-length/issues)
|
45 | - Source Code: [github.com/jviotti/unicode-length](https://github.com/jviotti/unicode-length)
|
46 |
|
47 | Before submitting a PR, please make sure that you include tests, and that [coffeelint](http://www.coffeelint.org/) runs without any warning:
|
48 |
|
49 | ```sh
|
50 | $ gulp lint
|
51 | ```
|
52 |
|
53 | Support
|
54 | -------
|
55 |
|
56 | If you're having any problem, please [raise an issue](https://github.com/jviotti/unicode-length/issues/new) on GitHub.
|
57 |
|
58 | License
|
59 | -------
|
60 |
|
61 | The project is licensed under the MIT license.
|