• Matches a parameter in the form name="Value"

    Parameters

    • name: string

      The name of the parameter

    • Optional valueType: string | RegExp

      The type of the value

    • Optional options: {
          global?: boolean;
          optional?: boolean;
      }

      Options for the parameter

      • Optional global?: boolean

        Whether to match globally

      • Optional optional?: boolean

        Whether the parameter is optional

    Returns RegExp

    A RegExp matching a parameter

    Example

    Matching a parameter with a URL value

    const m1 = QuotedParameter("url", HTTPURL());
    const t1 = "{{url=\"https://www.google.com\"}}";
    expect(t1.match(m1)).toBeTruthy();

    See

    RawParameter

Generated using TypeDoc