normalized-contains

v1.0.0
Checks whether a normalized version of a string contains another string
localeCompare contains includes Unicode Normalization

normalizedContains

A helper to compare two normalized versions of strings by ignoring language specific diacritics and case.

Usage

import { normalizedContains } from 'normalized-contains';

normalizedContains('Théâtre antique', 'theatre'); // true
normalizedContains('Halló', 'hallo'); // true
normalizedContains('Halló', 'hello'); // false

Install

npm install normalized-contains
npm i normalized-contains

Metadata

  • MIT
  • Whatever
  • everdimension
  • released 3/9/2023

Downloads

Maintainers