Socket
Socket
Sign inDemoInstall

unicode-length

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    unicode-length

Get the length of unicode strings


Version published
Weekly downloads
137K
decreased by-12.18%
Maintainers
1
Install size
35.9 kB
Created
Weekly downloads
 

Readme

Source

unicode-length

npm version dependencies Build Status

Installation

Install unicode-length by running:

$ npm install --save unicode-length

Documentation

Number unicodeLength.get(String input)

Get the length of a unicode string.

Example:

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

Tests

Run the test suite by doing:

$ gulp test

Contribute

Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:

$ gulp lint

Support

If you're having any problem, please raise an issue on GitHub.

License

The project is licensed under the MIT license.

Keywords

FAQs

Last updated on 12 Aug 2022

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