-
-
Notifications
You must be signed in to change notification settings - Fork 238
Expand file tree
/
Copy pathapi.js
More file actions
19 lines (19 loc) · 622 Bytes
/
api.js
File metadata and controls
19 lines (19 loc) · 622 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setSchemaValidator = exports.getContext = void 0;
var context = {
validate: undefined,
};
function getContext() {
return context;
}
exports.getContext = getContext;
function setSchemaValidator(params) {
if (typeof params.validate !== "function") {
throw new Error("validate must be a callback function having one arguemnt as xml input");
}
// assign the validate function to the context
context.validate = params.validate;
}
exports.setSchemaValidator = setSchemaValidator;
//# sourceMappingURL=api.js.map