UNPKG

@visulima/string

Version:

Functions for manipulating strings.

10 lines (8 loc) 459 B
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); const normalizeGermanEszett = /* @__PURE__ */ __name((value) => ( // Replace "SS" with "ß" only when both letters are uppercase // This uses a positive lookbehind to ensure we don't convert "ss" or "Ss" value.replaceAll(/(?<![a-zß])SS(?![a-z])/g, "ß") ), "normalizeGermanEszett"); export { normalizeGermanEszett as n };