Initializes a literal
The literal's lexical value
Optional
language: null | stringThe language for the literal. Defaults to ''.
Optional
datatype: anyThe literal's datatype as a named node. Defaults to xsd:string.
The class order for this node
The literal's datatype as a named node
The language for the literal
The type of node
The node's value
Static
toGets a copy of this literal
Gets whether two literals are the same
The other statement
Compares whether this node is the same as the other one
Another node
Creates a canonical string representation of this node
Creates a n-quads string representation of this node
Creates a n-triples string representation of this node
Creates a string representation of this node
Static
fromStatic
fromStatic
fromStatic
fromBuilds a literal node from an input value
The input value
Static
to
An RDF literal, containing some value which isn't expressed as an IRI.
Link
https://rdf.js.org/data-model-spec/#literal-interface