normalizeHost

utils · /index·function

Normalize a host header to a canonical or null if the input is empty / malformed / a leading-dot value.

Signature

@nordcom/commerce-utils
function normalizeHost(host: string): Hostname;

Parameters

NameTypeDescription
hoststring

ParsedHost AppName BuildEnv DevTld Hostname ShopHandle appFromHost isDevelopment

Sourcehostname.ts:124Edit the JSDoc directly
Metadata@nordcom/commerce-utils@0.0.0Open in GitHub ↗

On this page