iceshrimp-legacy/src/api/common/get-host-lower.ts
2018-03-27 23:51:21 +09:00

6 lines
140 B
TypeScript

import { toUnicode } from 'punycode';
export default host => {
return toUnicode(host).replace(/[A-Z]+/, match => match.toLowerCase());
};