@etsoo/toolpad
Version:
Dashboard framework extention based on Toolpad Core
15 lines (14 loc) • 333 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = warnOnce;
const history = new Set();
/**
* Warns only once for a specific message.
* @param msg The message to warn.
*/
function warnOnce(msg) {
if (!history.has(msg)) {
history.add(msg);
console.warn(msg);
}
}