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

unorm

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unorm

JavaScript Unicode Normalization - NFC, NFD, NFKC, NFKD. Read <http://unicode.org/reports/tr15/> UAX #15 Unicode Normalization Forms.

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
430K
decreased by-25.65%
Maintainers
1
Weekly downloads
 
Created

What is unorm?

The 'unorm' npm package provides Unicode normalization forms as specified in Unicode Standard Annex #15. It allows developers to normalize Unicode strings to ensure consistent representation of characters, which is crucial for string comparison, searching, and sorting.

What are unorm's main functionalities?

Normalization to NFC

This feature normalizes a string to the NFC (Normalization Form C) form, which composes characters to their canonical composed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfc(str);
console.log(normalizedStr);

Normalization to NFD

This feature normalizes a string to the NFD (Normalization Form D) form, which decomposes characters to their canonical decomposed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfd(str);
console.log(normalizedStr);

Normalization to NFKC

This feature normalizes a string to the NFKC (Normalization Form KC) form, which composes characters to their compatibility composed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfkc(str);
console.log(normalizedStr);

Normalization to NFKD

This feature normalizes a string to the NFKD (Normalization Form KD) form, which decomposes characters to their compatibility decomposed form.

const unorm = require('unorm');
const str = '\u1E9B\u0323';
const normalizedStr = unorm.nfkd(str);
console.log(normalizedStr);

Other packages similar to unorm

FAQs

Package last updated on 07 Oct 2013

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