@omni-door/utils
Version:
The utils of omni-door's projects
43 lines (42 loc) • 1.61 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBrand = exports.setBrand = exports.getLogo = exports.setLogo = exports.BRAND = exports.LOGO = void 0;
var chalk_1 = __importDefault(require("chalk"));
exports.LOGO = '🐸';
exports.BRAND = 'OMNI-DOOR';
var Brand = /** @class */ (function () {
function Brand() {
this.logo = exports.LOGO;
this.brand = exports.BRAND;
this.setLogo = this.setLogo.bind(this);
this.getLogo = this.getLogo.bind(this);
this.setBrand = this.setBrand.bind(this);
this.getBrand = this.getBrand.bind(this);
this.getLogPrefix = this.getLogPrefix.bind(this);
}
Brand.prototype.setLogo = function (logo) {
this.logo = logo || exports.LOGO;
};
Brand.prototype.getLogo = function () {
return this.logo || exports.LOGO;
};
Brand.prototype.setBrand = function (brand) {
this.brand = brand || exports.BRAND;
};
Brand.prototype.getBrand = function () {
return this.brand || exports.BRAND;
};
Brand.prototype.getLogPrefix = function () {
return (this.logo || exports.LOGO) + ' ' + chalk_1.default.underline('[' + (this.brand || exports.BRAND) + ']:');
};
return Brand;
}());
var brand = new Brand();
exports.setLogo = brand.setLogo;
exports.getLogo = brand.getLogo;
exports.setBrand = brand.setBrand;
exports.getBrand = brand.getBrand;
exports.default = brand.getLogPrefix;