the snak for this class in json format
if the upperBound is smaller than the amount or the lowerBound is bigger than the amount
const snak = new QuantitySnak(json);
Private
_amountPrivate
_lowerPrivate
_upperthe amount of the quantity
the number that the amount will be set to
true if the snak has a value
create a unique id for the Snak
the id
the lowerBound of the quantity
the number that the lowerBound will be set to
the upperBound of the quantity
the number that the upperBound will be set to
this function checks if two snaks are equal
the other snak
true if the snaks are equal
if (snak.equals(other)) {
// do something
}
Static
fromcreate a snak from some basic data
the property of the snak in 'P-form'
amount of the quantity
Optional
lowerBound: null | numberlowerBound of the quantity
Optional
upperBound: null | numberupperBound of the quantity
Optional
unit: `Q${number}`unit of the quantity
a snak with the given properties
const snak = QuantitySnak.fromNumbers('P1215', 1);
Generated using TypeDoc
class for the QuantitySnak
most used property of this type P1215 (apparent magnitude)