Skip to content

Function: parseUrl()

ts
function parseUrl(url: string): URLWithParam | null

解析URL

Example

ts
const url = 'https://www.baidu.com/s?wd=hello#world'
const result = parseUrl(url)

Parameters

ParameterTypeDescription

url

string

统一资源定位符

Returns

URLWithParam | null