toFullUrl
toFullUrl(url, options)
toFullUrl(url, options)Arguments
Returns
Example
typescript
import { toFullUrl } from 'check-engineering/ts-utils';
const partialUrl = "example.com";
const fullUrl = toFullUrl(partialUrl); // => "https://example.com"Usage
typescript
import { toFullUrl } from 'check-engineering/ts-utils';
const partialUrl = "subdomain.example.com";
const customOptions = { protocol: "http://" };
const customizedUrl = toFullUrl(partialUrl, customOptions); // => "http://subdomain.example.com"Notes
Last updated