A class for References.
The Reference in JSON format.
const reference = new Reference(json); Copy
const reference = new Reference(json);
Creates a unique ID for the Reference.
The ID.
Checks if References are equal.
The other Reference.
True if the References are equal.
const reference = Reference.fromSnaks([ new Snak('P123', 'Q42'), new Snak('P456', 'Q43') ]); const reference2 = Reference.fromSnaks([ new Snak('P123', 'Q42') ]); reference.equals(reference2); // false Copy
const reference = Reference.fromSnaks([ new Snak('P123', 'Q42'), new Snak('P456', 'Q43') ]); const reference2 = Reference.fromSnaks([ new Snak('P123', 'Q42') ]); reference.equals(reference2); // false
The Reference in a JSON format.
const json = reference.toJSON(); Copy
const json = reference.toJSON();
Static
Creates a new Reference from snaks.
The snaks for the Reference.
The Reference object.
const reference = Reference.fromSnaks([ new Snak('P123', 'Q42'), new Snak('P456', 'Q43') ]); Copy
const reference = Reference.fromSnaks([ new Snak('P123', 'Q42'), new Snak('P456', 'Q43') ]);
A class for References.