mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
Moves the type file out of the cli package and into its own standalone package. utilizes `@vercel/style-guide` too for typescript config, eslint, and prettier.
16 lines
384 B
TypeScript
16 lines
384 B
TypeScript
import { Domain } from '@vercel-internals/types';
|
|
|
|
export type DomainRegistrar = 'Vercel' | 'Purchase in Process' | 'Third Party';
|
|
|
|
export function getDomainRegistrar(domain: Domain): DomainRegistrar {
|
|
if (domain.boughtAt) {
|
|
return 'Vercel';
|
|
}
|
|
|
|
if (typeof domain.orderedAt === 'number' && !domain.boughtAt) {
|
|
return 'Purchase in Process';
|
|
}
|
|
|
|
return 'Third Party';
|
|
}
|