Options
All
  • Public
  • Public/Protected
  • All
Menu

An index of frequencies

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private index

index: Map<string, number>

Methods

Protected incrementIndex

  • incrementIndex(key: string, value?: number): void
  • Adds a number to the key's value. If no number is given the default amount will be added to the value.

    Parameters

    • key: string
    • Default value value: number = 1

      optional value to add

    Returns void

Protected readIndex

  • readIndex(key: string): number
  • Reads a value from the index. If the key does not exist the result will be 0.

    Parameters

    • key: string

    Returns number

Protected writeIndex

  • writeIndex(key: string, value: number): void
  • Manually writes a value to the index

    deprecated

    use incrementIndex instead.

    Parameters

    • key: string
    • value: number

    Returns void

Generated using TypeDoc