Parameters:
Name |
Type |
Description |
type |
string
|
|
value |
Object
|
|
Members
#
(static) Type :string
#
value :Object
Methods
Parameters:
Name |
Type |
Description |
entityId |
string
|
|
#
(static) fromMonolingualText(languageCode, text) → {WikidataPain.DataValue}
Parameters:
Name |
Type |
Description |
languageCode |
string
|
|
text |
string
|
|
#
(static) fromQuantity(amount, precision, unit) → {WikidataPain.DataValue}
Parameters:
Name |
Type |
Description |
amount |
string
|
|
precision |
string
|
|
unit |
string
|
|
Parameters:
Name |
Type |
Description |
raw |
Object
|
|
Parameters:
Name |
Type |
Description |
string |
number
|
string
|
|
#
(static) fromTime(year, monthopt, dayopt) → {WikidataPain.DataValue}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
year |
number
|
string
|
|
|
Year, or alternatively date string in the format `yyyy-mm-dd`. |
month |
number
|
<optional>
|
null
|
|
day |
number
|
<optional>
|
null
|
|
Convert a QuickStatement-date-string to a time-object.
Parameters:
Name |
Type |
Description |
date |
string
|
Timestamp in QuickStatement-format. |
Parameters:
Name |
Type |
Description |
precision |
number
|
|
Compares the precision of this DataValue with another DataValue's precision.
#
equals(other) → {boolean}
Compares this DataValue with another DataValue.
Returns:
`true` if equal, otherwise `false`.
-
Type
-
boolean
#
toJSON() → {Object}
#
toString() → {string}