This reverts commit b31b232edf
.
This commit is contained in:
parent
111a0628fc
commit
1d8d553d8b
3 changed files with 10 additions and 101 deletions
|
@ -1,10 +0,0 @@
|
|||
import punycode from 'punycode';
|
||||
|
||||
const IDNA_PREFIX = 'xn--';
|
||||
|
||||
export const decode = domain => {
|
||||
return domain
|
||||
.split('.')
|
||||
.map(part => part.indexOf(IDNA_PREFIX) === 0 ? punycode.decode(part.slice(IDNA_PREFIX.length)) : part)
|
||||
.join('.');
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue