What is uc.micro?
The uc.micro package is a collection of micro-modules for handling Unicode characters in various ways. It's particularly useful for tasks involving character categorization, normalization, and manipulation in a Unicode-aware manner. This package is designed to be lightweight and efficient, making it ideal for applications where performance and minimal footprint are critical.
What are uc.micro's main functionalities?
Categories of Unicode characters
This feature allows you to access various categories of Unicode characters, such as lowercase letters, uppercase letters, numbers, etc. The provided code sample demonstrates how to access the array of lowercase letter Unicode points.
"use strict";
const categories = require('uc.micro/categories');
console.log(categories.Ll); // Logs an array of lowercase letter Unicode points
Properties of Unicode characters
This feature enables access to specific properties of Unicode characters, such as alphabetic, numeric, and so on. The code sample shows how to retrieve an array of Unicode points that are considered alphabetic.
"use strict";
const properties = require('uc.micro/properties');
console.log(properties.Alphabetic); // Logs an array of Unicode points that have the alphabetic property
Normalization of Unicode characters
This feature provides functionality for normalizing Unicode characters according to different normalization forms. The code sample demonstrates normalizing a character to its NFD (Normalization Form Decomposed) representation.
"use strict";
const normalize = require('uc.micro/normalize');
console.log(normalize('NFD', 'á')); // Logs the NFD (Normalization Form Decomposed) version of 'á'
Other packages similar to uc.micro
unorm
Similar to uc.micro's normalization features, unorm provides Unicode normalization forms for JavaScript. It covers a broader range of normalization functionalities but might be larger in size compared to the focused modules of uc.micro.
unicode-12.1.0
This package offers a comprehensive collection of Unicode data and tools for JavaScript, similar to uc.micro's character categorization and properties features. It's more extensive and includes data from Unicode version 12.1.0, making it potentially more up-to-date but also larger in size.
uc.micro
Micro subset of unicode data files for markdown-it projects.
Content of this repo is autogenerated from unicode package, maintained by Mathias Bynens.
Curently from unicode-7.0.0.
That's just a proxy to reduce dependencies/install size.
This package content is ONLY for markdown-it projects needs. Don't ask to extend it!
License
WTFPL