Function parseURLParams

  • parse the search params to JSON from given url

    Parameters

    • url: string

      string

    Returns ParsedURLParamType

    JSON structure that is string key and string value

    Example

    const url = `https://www.51shihuimiao.com?x=1&y=2&direct=${encodeURIComponent('https://www.51shihuimiao.com?z=3')}`

    parse(url)
    // => { x:'1', y:'2', direct:'https://www.51shihuimiao.com?z=3' }

Generated using TypeDoc