UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

14 lines (10 loc) 473 B
import { MockFunction } from '@/services/Mocker' const endings = ['com', 'net', 'io', 'org'] export const randomUrl: MockFunction<string, [boolean?]> = function(ssl) { const secure = ssl ?? this.create('boolean') const protocol = secure ? 'https' : 'http' const subdomain = this.create('noun') const domain = this.create('noun') const ending = endings[this.create('number', [0, endings.length - 1])] return `${protocol}://${subdomain}.${domain}.${ending}` }