UNPKG

rdflib

Version:

an RDF library for node.js. Suitable for client and server side.

23 lines (22 loc) 680 B
import _defineProperty from "@babel/runtime/helpers/defineProperty"; import Node from './node-internal'; import { DefaultGraphTermType } from './types'; import { defaultGraphURI } from './utils/default-graph-uri'; /** The RDF default graph */ export default class DefaultGraph extends Node { constructor() { super(''); _defineProperty(this, "value", ''); _defineProperty(this, "termType", DefaultGraphTermType); _defineProperty(this, "uri", defaultGraphURI); } toCanonical() { return this.value; } toString() { return 'DefaultGraph'; } } export function isDefaultGraph(object) { return !!object && object.termType === DefaultGraphTermType; }