Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unicode-length

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unicode-length

Get the length of unicode strings

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
204K
increased by12.12%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 12 Aug 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc