This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
website/src/utils/resolveAs.ts

7 lines
209 B
TypeScript
Raw Normal View History

2021-03-28 07:10:55 +00:00
import { resolveHref } from 'next/dist/next-server/lib/router/router';
import { UrlObject } from 'url';
const resolveAs = (url: UrlObject): string => resolveHref('', url, true)[1];
export default resolveAs;