url-builder
A package that builds URLs through JavaScript
Usage
const url = ;console;
This outputs https://github.com/galactic-packages/url-builder/
Types
Attribute | Data Type | Description |
---|---|---|
URL() | class | Used to set the URL object |
.isWWW() | boolean | Specifies if the domain includes www |
.isHTTP() | boolean | Specifies if the domain is http or https |
.setSubdomain() | string | Sets the subdomain of the URL |
.setDomain() | string | Sets the domain of the url |
.setEnding() | string | Sets the ending of the url (com, org, net, edu, etc) |
.addDirectory() | string | Add a directory to the URL |
.getURL() | none | Returns the whole URL, with the settings specified above |
Optional Settings
The settings above are optional excluding .setDomain()
and .setEnding()
. All other settings are set automatically, unless specified by the user.