UNPKG

log-mess

Version:

Log messages with tags and configuration

17 lines 554 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTag = getTag; function getTag(tag, decoration) { if (!tag) return []; if (navigator.userAgent.indexOf("Trident") !== -1) return [`[${tag}]`]; const tagText = `%c ${tag} `; if (decoration?.bg || decoration?.fg) return [ tagText, `background: ${decoration.bg || "white"}; color: ${decoration.fg || "black"};`, ]; return [tagText, "border: 1px solid black;"]; } //# sourceMappingURL=tag.js.map