Skip to content

Documents for @litert/otp / URL / parse

Function: parse()

parse(url): IUrlInfoForHOTP | IUrlInfoForTOTP

Defined in: URL.ts:170

Parse a OTP URL into structure.

Parameters

url

string

The OTP url.

Returns

IUrlInfoForHOTP | IUrlInfoForTOTP

The parsed OTP url info.

Throws

SyntaxError if the URL is invalid.