Class StringSnak

class for the StringSnak

most used property of this type P1545 (series ordinal)

Hierarchy (view full)

Constructors

Properties

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

Accessors

  • get hasValue(): boolean
  • Returns boolean

    true if the snak has a value

  • get internalID(): string
  • create 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

    Example

    if (stringSnak.equals(other)) {
    // do something
    }
  • Parameters

    • property: `P${number}`

      the property of the snak in 'P-form'

    • string: string

      the string

    Returns StringSnak

    a snak with the given properties

    Static

    Example

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

Generated using TypeDoc