Class AbstractGetInsightsResponse<T>Abstract

Abstract class for representing a response from a Page Insights request.

Author

Tiago Grosso tiagogrosso99@gmail.com

Since

0.1.0

Type Parameters

Hierarchy

Constructors

Properties

data: T[]

The response data.

Methods

  • Finds the first metric that matches the given expression. Returns undefined if no match is found.

    Returns

    the first metric that matches the given expression or undefined if no match is found.

    Parameters

    • expression: ((metric: T) => boolean)

      the expression to match with the metric.

        • (metric: T): boolean
        • Parameters

          • metric: T

          Returns boolean

    Returns undefined | T

  • Finds the metric with the given name. Returns undefined if not found.

    Returns

    the metric with the given name or undefined if not found.

    Parameters

    • name: string

      the name of the metric.

    • ignoreCase: boolean = true

      whether to ignore the case of the name. True by default.

    Returns undefined | T

  • Finds all the metrics that match the given expression.

    Returns

    an array of the metrics that match the expression.

    Parameters

    • expression: ((metric: T) => boolean)

      the expression to match with the metrics.

        • (metric: T): boolean
        • Parameters

          • metric: T

          Returns boolean

    Returns T[]

  • Finds all the metrics whose names match the given regex.

    Returns

    the metrics whose names match the given regex.

    Parameters

    • regexString: string

    Returns T[]

Generated using TypeDoc