1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-29 22:18:20 +09:00
cherrypick/src/server/api/common/get-host-lower.ts

7 lines
148 B
TypeScript
Raw Normal View History

2018-03-27 16:51:12 +09:00
import { toUnicode } from 'punycode';
2018-06-18 09:54:53 +09:00
export default (host: string) => {
2018-11-11 18:26:09 +09:00
if (host == null) return null;
return toUnicode(host).toLowerCase();
2018-03-27 16:51:12 +09:00
};