mindee
Version:
Mindee Client Library for Node.js
19 lines (18 loc) • 705 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseField = void 0;
const fieldLocation_1 = require("./fieldLocation");
class BaseField {
constructor(rawResponse, indentLevel = 0) {
this._indentLevel = indentLevel;
if ("confidence" in rawResponse && rawResponse["confidence"] !== null) {
this.confidence = rawResponse["confidence"];
}
if ("locations" in rawResponse && rawResponse["locations"]) {
this.locations = rawResponse["locations"].map((location) => {
return location ? new fieldLocation_1.FieldLocation(location) : "";
});
}
}
}
exports.BaseField = BaseField;