@wener/console
Version:
Base console UI toolkit
16 lines (15 loc) • 380 B
JavaScript
let counter;
export function warn(msg, ...args) {
if (!counter) {
counter = {};
}
counter[msg] = counter[msg] || 0;
let count = counter[msg]++;
if (count === 0) {
console.trace(`[WARN] ${count}: ${msg}`, ...args);
} else {
console.warn(`[WARN] ${count}: ${msg}`, ...args);
}
return count;
}
//# sourceMappingURL=warn.js.map