Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ITextStats

text statistics object

Hierarchy

  • ICommonStats<string>
    • ITextStats

Index

Properties

count: number

number of items in the array

depth: number

in case of nested arrays what is the max nested depth

flatCount: number

number of items in the array

flatItems: readonly string[]

the items in this stats

flatMissing: number

number of missing items in the array

items: readonly (string | (readonly string[]) | Set<string>)[]

the items in this stats

missing: number

number of missing items in the array

mostFrequent: readonly { count: number; value: string }[]

top 10 most frequent text items sorted descending by count

unique: number

number of unique text items

Methods

  • [toPrimitive](hint: "default"): string
  • [toPrimitive](hint: "string"): string
  • [toPrimitive](hint: "number"): number
  • [toPrimitive](hint: string): string | number
  • Converts a Stats object to a string.

    Parameters

    • hint: "default"

    Returns string

  • Converts a Stats object to a string.

    Parameters

    • hint: "string"

    Returns string

  • Converts a Stats object to a number.

    Parameters

    • hint: "number"

    Returns number

  • Converts a Stats object to a string or number.

    throws

    {TypeError} If 'hint' was given something other than "number", "string", or "default".

    Parameters

    • hint: string

      The strings "number", "string", or "default" to specify what primitive to return.

    Returns string | number

    A number if 'hint' was "number", a string if 'hint' was "string" or "default".

  • format(v: string): string
  • converts a given string to a label

    Parameters

    • v: string

    Returns string

Generated using TypeDoc