Function getURLParamValue

  • Get the value of a parameter in the URL by inputting the parameter name.

    Since

    v0.0.1

    Returns

    Parameter Value

    Example

    // Get the name parameter value
    const url = 'http://example.com?name=value'
    console.log(
    getURLParamValue(url, 'name')
    )
    => 'value'

    Parameters

    • url: string

      URL

    • key: string

      Parameter Name

    Returns string