Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / parseAuthority

Function: parseAuthority()

ts
function parseAuthority(authority): 
  | {
  host: string;
  port?: number;
  userinfo?: string;
}
  | undefined;

Defined in: packages/security/src/secrets/secret-ref.ts:443

Split an authority string of the form [userinfo@]host[:port] into its components. host is lowercased per RFC 3986; userinfo and port are returned verbatim. Returns undefined if the authority is empty.

Parameters

ParameterType
authoritystring

Returns

| { host: string; port?: number; userinfo?: string; } | undefined

Stable