Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Metric<string, string>
    • UrlMetric

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _inner

_inner: string

Methods

get

  • get(): string

payload

  • payload(): string

set

  • set(v: unknown): void
  • Sets this metrics value.

    throws

    In case the metric is not in the expected format.

    Parameters

    • v: unknown

      The value to set, must be in the exact internal representation of this metric.

    Returns void

validate

  • validate(v: unknown): v is string
  • Validates that a given value is a valid URL metric value.

    1. The URL must be a string.
    2. The URL must have a maximum length of URL_MAX_LENGTH characters.
    3. The URL must not be a data URL.
    4. Every URL must start with a valid scheme.

    Note: We explicitly do not validate if the URL is fully spec compliant, the above validations are all that is done.

    Parameters

    • v: unknown

      The value to validate.

    Returns v is string

    Whether or not v is a valid URL-like string.

Generated using TypeDoc