@briancullen/aws-textract-parser
Version:
Library for converting AWS Textract responses into a more usable structure.
29 lines (28 loc) • 977 B
JavaScript
;
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var BlockNode = /** @class */ (function () {
function BlockNode(childList) {
this.childList = childList;
}
BlockNode.prototype.parent = function () {
return this.parentNode;
};
BlockNode.prototype.setParant = function (parent) {
this.parentNode = parent;
};
BlockNode.prototype.children = function () {
return __spreadArrays(this.childList);
};
BlockNode.prototype.hasChild = function (item) {
return this.childList.includes(item);
};
return BlockNode;
}());
exports.default = BlockNode;