mirror of
https://github.com/itflow-org/itflow
synced 2026-09-12 01:35:12 +00:00
Bump intl-tel-input
This commit is contained in:
10
libs/intl-tel-input/js/helpers/string.ts
Normal file
10
libs/intl-tel-input/js/helpers/string.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
//* Extract the numeric digits from the given string (\D matches any non-digit).
|
||||
export const getNumeric = (s: string): string => s.replace(/\D/g, "");
|
||||
|
||||
//* Normalise string: turns "Réunion" into "Reunion".
|
||||
//* from https://stackoverflow.com/a/37511463
|
||||
export const normaliseString = (s: string = ""): string =>
|
||||
s
|
||||
.normalize("NFD")
|
||||
.replace(/[\u0300-\u036f]/g, "")
|
||||
.toLowerCase();
|
||||
Reference in New Issue
Block a user