2017-06-26 22:27:55 +00:00
|
|
|
import uts46 from 'idna-uts46';
|
|
|
|
|
|
|
|
export function normalise(name: string): string {
|
2017-07-02 05:49:06 +00:00
|
|
|
try {
|
|
|
|
return uts46.toUnicode(name, { useStd3ASCII: true, transitional: false });
|
|
|
|
} catch (e) {
|
|
|
|
throw e;
|
|
|
|
}
|
2017-06-26 22:27:55 +00:00
|
|
|
}
|