@grafana/faro-core
Version:
Core package of Faro.
45 lines • 1.82 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockTransport = void 0;
var transports_1 = require("../transports");
var version_1 = require("../version");
var MockTransport = /** @class */ (function (_super) {
__extends(MockTransport, _super);
function MockTransport(ignoreURLs) {
if (ignoreURLs === void 0) { ignoreURLs = []; }
var _this = _super.call(this) || this;
_this.ignoreURLs = ignoreURLs;
_this.name = '@grafana/transport-mock';
_this.version = version_1.VERSION;
_this.items = [];
return _this;
}
MockTransport.prototype.send = function (items) {
var _a;
(_a = this.items).push.apply(_a, items);
};
MockTransport.prototype.isBatched = function () {
return true;
};
MockTransport.prototype.getIgnoreUrls = function () {
return this.ignoreURLs;
};
return MockTransport;
}(transports_1.BaseTransport));
exports.MockTransport = MockTransport;
//# sourceMappingURL=mockTransport.js.map