Class MathSnak

Class for the MathSnak.

Most used property of this type is P2534 (defining formula).

Hierarchy (View Summary)

Constructors

Properties

datatype: string = dataType
hash: undefined | string
property: `P${number}`
snaktype: SnakType
value: undefined | string

A math expression

Accessors

  • get hasValue(): boolean
  • Checks if the snak has a value.

    Returns boolean

    True if the snak has a value.

  • get internalID(): string
  • Creates a unique ID for the Snak.

    Returns string

    The ID.

Methods

  • This function checks if two snaks are equal.

    Parameters

    Returns boolean

    True if the snaks are equal.

    if (snak.equals(other)) {
    // do something
    }