'use strict';

var formatErrorMessage = require('./format-error-message.js');

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

exports.warnOnce = warnOnce;
