@regionorebrolan/extensions
Version:
Library with JavaScript additions and extensions.
100 lines • 3.39 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 (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var Wrapper_1 = __importDefault(require("./Abstractions/Wrapper"));
var UriWrapper = /** @class */ (function (_super) {
__extends(UriWrapper, _super);
// Constructors
function UriWrapper(uri) {
var _this = _super.call(this, uri, "uri") || this;
// Fields
_this._port = null;
if (uri.port()) {
var port = parseInt(uri.port());
_this._port = isNaN(port) ? null : port;
}
return _this;
}
Object.defineProperty(UriWrapper.prototype, "authority", {
// Properties
get: function () {
return this.wrappedInstance.host();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "fragment", {
get: function () {
return this.wrappedInstance.fragment();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "host", {
get: function () {
return this.wrappedInstance.hostname();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "password", {
get: function () {
return this.wrappedInstance.password();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "path", {
get: function () {
return this.wrappedInstance.pathname();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "port", {
get: function () {
return this._port;
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "query", {
get: function () {
return this.wrappedInstance.query();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "scheme", {
get: function () {
return this.wrappedInstance.protocol();
},
enumerable: false,
configurable: true
});
Object.defineProperty(UriWrapper.prototype, "userName", {
get: function () {
return this.wrappedInstance.username();
},
enumerable: false,
configurable: true
});
return UriWrapper;
}(Wrapper_1.default));
exports.default = UriWrapper;
//# sourceMappingURL=UriWrapper.js.map