UNPKG

@toolpad/utils

Version:

Shared utilities used by Toolpad packages.

18 lines (16 loc) 324 B
"use strict"; 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); } }