UNPKG

@wordpress/editor

Version:
13 lines (12 loc) 436 B
// packages/editor/src/utils/normalize-text-string.ts import removeAccents from "remove-accents"; var ALL_UNICODE_DASH_CHARACTERS = new RegExp( /[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu ); var normalizeTextString = (value) => { return removeAccents(value).normalize("NFKC").toLocaleLowerCase().replace(ALL_UNICODE_DASH_CHARACTERS, "-"); }; export { normalizeTextString }; //# sourceMappingURL=normalize-text-string.mjs.map