UNPKG

@inrupt/experimental-graphql-directives-linked-data

Version:
17 lines (16 loc) 462 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.asTerm = void 0; function isTerm(input) { return (typeof input === "object" && input !== null && typeof input.termType === "string" && typeof input.value === "string"); } function asTerm(input) { if (!isTerm(input)) { throw new Error(`Expected RDF/JS term, instead received ${input}`); } return input; } exports.asTerm = asTerm;