xml-fiesta
Version:
Electronic signed document XML Protocol for Node & Browser
39 lines • 1.67 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var xml_1 = require("../xml");
var PatchedXML = (function (_super) {
__extends(PatchedXML, _super);
function PatchedXML() {
return _super !== null && _super.apply(this, arguments) || this;
}
PatchedXML.removeGeolocation = function (xmljs) {
var _a, _b, _c;
_super.removeGeolocation.call(this, xmljs);
(_c = (_b = (_a = xmljs.signers) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.signer) === null || _c === void 0 ? void 0 : _c.forEach(function (signer) {
var _a;
if (!signer.auditTrail) {
(_a = signer.event) === null || _a === void 0 ? void 0 : _a.forEach(function (event, index) {
if (event.$.name === "geolocation") {
delete signer.event[index];
}
});
}
});
};
return PatchedXML;
}(xml_1.default));
exports.default = PatchedXML;
//# sourceMappingURL=xmlPatch.js.map