@xylabs/url

Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Install
Using npm:
npm install {{name}}
Using yarn:
yarn add {{name}}
Using pnpm:
pnpm add {{name}}
Using bun:
bun add {{name}}
License
See the LICENSE file for license rights and limitations (LGPL-3.0-only).
Reference
packages
url
### .temp-typedoc
### index-browser
### functions
### <a id="isLocalhost"></a>isLocalhost
@xylabs/url
function isLocalhost(hostname): boolean;
Checks whether a hostname refers to the local machine (localhost, 127.0.0.1, ::1, or *.localhost).
Parameters
hostname
string
The hostname to check
Returns
boolean
true if the hostname is a localhost address
### variables
### <a id="URL"></a>URL
@xylabs/url
const URL: (url, base?) => URL;
Browser-specific URL class, aliased from the global URL.
Parameters
url
string | URL
base?
string | URL
Returns
URL
### index-neutral
### variables
### <a id="URL"></a>URL
@xylabs/url
const URL: (url, base?) => URL;
Platform-neutral URL class, aliased from the global URL.
Parameters
url
string | URL
base?
string | URL
Returns
URL
### index-node
### variables
### <a id="URL"></a>URL
@xylabs/url
const URL: (url, base?) => URL;
Node.js-specific URL class, imported from the node:url module.
Parameters
url
string | URL
base?
string | URL
Returns
URL