UNPKG

@poseidat/schemas

Version:

The core schemas for the PoseiDAT data interchange formats

32 lines 929 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Journal = void 0; var schemas_1 = require("./schemas"); var schema_validator_1 = require("./schema-validator"); /** * Convenience class for constructing and validating a Journal * * @export * @class Journal */ var Journal = /** @class */ (function () { /** * Creates an instance of Journal * * @param {ICoreJournal} [data={}] The data to initialize the Journal with */ function Journal(data) { this.data = data; } /** * Validates the current Journal data against the core schema * * @returns {ajv.ErrorObject[]} */ Journal.prototype.validate = function () { return (0, schema_validator_1.validateSchema)({ object: this.data, schema: schemas_1.schemas.core.journal }); }; return Journal; }()); exports.Journal = Journal; //# sourceMappingURL=journal.js.map