helpers.js
function normalizeString(val, normalizer) {
    if (!normalizer) {
        normalizer = (str) => str.toLowerCase().trim();
    }
    return normalizer(toStringSafe(val));
}
function normalizeString(val, normalizer) {
    if (!normalizer) {
        normalizer = (str) => str.toLowerCase().trim();
    }
    return normalizer(toStringSafe(val));
}
function normalizeString ( val , normalizer ) { if ( ! normalizer ) { normalizer = ( str ) => str . toLowerCase ( ) . trim ( ) ; } return normalizer ( toStringSafe ( val ) ) ; }
Normalizes a value as string so that is comparable.

@param {any} val The value to convert.
@param {(str: string) => string} [normalizer] The custom normalizer.

@return {string} The normalized value.
Normalizes a value as string so that is comparable .