1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-29 05:58:06 +09:00
hotomoe/src/server/api/common/get-host-lower.ts
2018-11-11 18:26:09 +09:00

7 lines
148 B
TypeScript

import { toUnicode } from 'punycode';
export default (host: string) => {
if (host == null) return null;
return toUnicode(host).toLowerCase();
};