Skip to content

Repository files navigation

casefold-norm

Implements the Unicode canonical case fold normalization step for JavaScript.

Install

Install from the npm registry:

npm i casefold-norm

Or, download casefold-norm.js and mappings.js directly.

Usage

import { canonicalCasefoldNormalize } from 'casefold-norm';
import caseFolding from 'casefold-norm/mappings';

const seen = new Set().add(canonicalCasefoldNormalize('όσος', caseFolding));
seen.has(canonicalCasefoldNormalize('ΌΣΟΣ', caseFolding)); // true

Details are in the JSDoc comments.

To generate the mappings for canonicalCasefoldNormalize() from the latest Unicode version, run the bundled CLI: npx casefold-norm. The output path defaults to './mappings.js'; it can be specified with -o or --output.

License

Copyright (c) 2026 Lee Jisol <ijisol@naver.com>

Licensed under the MIT License.

About

Implements the Unicode canonical case fold normalization step for JavaScript.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages