import { formatErrorMessage } from './format-error-message.mjs';

const warned = new Set();
function warnOnce(condition, message, errorCode) {
    if (condition || warned.has(message))
        return;
    console.warn(formatErrorMessage(message, errorCode));
    warned.add(message);
}

export { warnOnce };
