misskey/src/server/api/common/get-host-lower.ts
2018-03-29 01:54:41 +09:00

6 lines
140 B
TypeScript

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