connection-string
Version:
Advanced URL Connection String parser + generator.
27 lines (26 loc) • 1.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupCustomInspect = void 0;
var inspect = require('util').inspect;
var EOL = require('os').EOL;
var setupCustomInspect = function (obj) {
// istanbul ignore else
if (typeof module !== 'undefined') {
var inspecting_1 = false;
Object.defineProperty(obj.prototype, inspect.custom, {
value: function () {
if (inspecting_1) {
return this;
}
inspecting_1 = true;
var options = { colors: process.stdout.isTTY };
var src = inspect(this, options);
var _a = this, host = _a.host, hostname = _a.hostname, port = _a.port, type = _a.type;
var vp = inspect({ host: host, hostname: hostname, port: port, type: type }, options);
inspecting_1 = false;
return "".concat(src).concat(EOL, "Virtual Properties: ").concat(vp);
}
});
}
};
exports.setupCustomInspect = setupCustomInspect;