Normalize a string by converting diacriticals to base characters, removing non-word characters, and converting to lower case. Null returns null; all other non-strings return undefined.
Parameters
Optionalvalue: string|null
The string to normalize.
Returns string|null|undefined
The normalized string or undefined if not a string.
Example
constvalue = normstr('Við skulum fara á fjörðurinn í kvöld.'); // value === 'viskulumfaraafjorurinnikvold'
Normalize a string by converting diacriticals to base characters, removing non-word characters, and converting to lower case. Null returns null; all other non-strings return undefined.