Options
All
  • Public
  • Public/Protected
  • All
Menu
     

Class ITM

A class representing an item within a DCT instance.

Hierarchy

  • ITM

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ITM(key: DCTKey | Object, value?: any, parent: DCT): ITM
  • Instantiates a new ITM instance.

    Parameters

    • key: DCTKey | Object

      The key or key/value pair of the item.

    • Optional value: any

      The (optional) value of the item.

    • parent: DCT

      The parent this item belongs to.

    Returns ITM

Properties

par

par: DCT | Object

The parent of this ITM.

key

key: DCTKey

The key of the item.

val

val: any

The value of the item.

parent

parent: DCT

The parent of this ITM.

idx

idx: number

The index of this ITM.

pos

pos: number

The position of this ITM as it pertains to other ITMs within it's DCT parent who share the same key.

Methods

toString

  • toString(): string
  • A String representation of this ITM.

    Returns string

toArray

  • toArray(): any
  • An Array representation of this ITM.

    Returns any

toObject

  • toObject(): Object
  • A plain-object representation of this ITM.

    Returns Object

toJSON

  • toJSON(): string
  • A JSON-String representation of this ITM.

    Returns string