manifesto.js
Version:
IIIF Presentation API utility library for client and server
21 lines • 677 B
JavaScript
var JSONLDResource = /** @class */ (function () {
function JSONLDResource(jsonld) {
this.__jsonld = jsonld;
this.context = this.getProperty("context");
this.id = this.getProperty("id");
}
JSONLDResource.prototype.getProperty = function (name) {
var prop = null;
if (this.__jsonld) {
prop = this.__jsonld[name];
if (!prop) {
// property may have a prepended '@'
prop = this.__jsonld["@" + name];
}
}
return prop;
};
return JSONLDResource;
}());
export { JSONLDResource };
//# sourceMappingURL=JSONLDResource.js.map