UNPKG

@timebutt/face-api.js

Version:

JavaScript API for face detection and face recognition in the browser with tensorflow.js

25 lines 890 B
import { __extends } from "tslib"; import { isValidNumber } from '../utils'; import { Box } from './Box'; var LabeledBox = /** @class */ (function (_super) { __extends(LabeledBox, _super); function LabeledBox(box, label) { var _this = _super.call(this, box) || this; _this._label = label; return _this; } LabeledBox.assertIsValidLabeledBox = function (box, callee) { Box.assertIsValidBox(box, callee); if (!isValidNumber(box.label)) { throw new Error("".concat(callee, " - expected property label (").concat(box.label, ") to be a number")); } }; Object.defineProperty(LabeledBox.prototype, "label", { get: function () { return this._label; }, enumerable: false, configurable: true }); return LabeledBox; }(Box)); export { LabeledBox }; //# sourceMappingURL=LabeledBox.js.map