WikidataPain.Snak

Members

static Type :string

datavalue :WikidataPain.DataValue

property :string

snaktype :WikidataPain.Snak.Type

Methods

static fromDataValue(property, dataValue) → {WikidataPain.Snak}

Parameters:
Name Type Description
property string
dataValue WikidataPain.DataValue

static fromEntity(property, entityId) → {WikidataPain.Snak}

Parameters:
Name Type Description
property string
entityId string

static fromRaw(raw) → {WikidataPain.Snak}

Parameters:
Name Type Description
raw Object

static fromString(property, string) → {WikidataPain.Snak}

Parameters:
Name Type Description
property string
string string

static fromTime(property, year, monthopt, dayopt) → {WikidataPain.Snak}

Parameters:
Name Type Attributes Default Description
property string
year number
month number <optional>
null
day number <optional>
null

comparePrecision(other) → {WikidataPain.PrecisionComparison}

Compares the precision of this Snak with another Snak's precision.
Parameters:
Name Type Description
other WikidataPain.Snak Snak to compare to.

equals(other) → {boolean}

Compares this Snak with another Snak.
Parameters:
Name Type Description
other WikidataPain.Snak Snak to compare to.
Returns:
boolean - `true` if equal, otherwise `false`.

toJSON() → {Object}

Returns:
Object

toString() → {string}

Returns:
string