FaceMatch.js 937 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var utils_1 = require("../utils");
  4. var FaceMatch = /** @class */ (function () {
  5. function FaceMatch(label, distance) {
  6. this._label = label;
  7. this._distance = distance;
  8. }
  9. Object.defineProperty(FaceMatch.prototype, "label", {
  10. get: function () { return this._label; },
  11. enumerable: true,
  12. configurable: true
  13. });
  14. Object.defineProperty(FaceMatch.prototype, "distance", {
  15. get: function () { return this._distance; },
  16. enumerable: true,
  17. configurable: true
  18. });
  19. FaceMatch.prototype.toString = function (withDistance) {
  20. if (withDistance === void 0) { withDistance = true; }
  21. return "" + this.label + (withDistance ? " (" + utils_1.round(this.distance) + ")" : '');
  22. };
  23. return FaceMatch;
  24. }());
  25. exports.FaceMatch = FaceMatch;
  26. //# sourceMappingURL=FaceMatch.js.map