Implements the Unicode canonical case fold normalization step for JavaScript.
Install from the npm registry:
npm i casefold-normOr, download casefold-norm.js and mappings.js directly.
import { canonicalCasefoldNormalize } from 'casefold-norm';
import caseFolding from 'casefold-norm/mappings';
const seen = new Set().add(canonicalCasefoldNormalize('όσος', caseFolding));
seen.has(canonicalCasefoldNormalize('ΌΣΟΣ', caseFolding)); // trueDetails 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.
Copyright (c) 2026 Lee Jisol <ijisol@naver.com>
Licensed under the MIT License.