function validateEnvironment(environment, envContext, source = null) {

    // not having an environment is ok
    if (!environment) {
        return;
    }

    Object.keys(environment).forEach(env => {
        if (!envContext.get(env)) {
            const message = `${source}:\n\tEnvironment key "${env}" is unknown\n`;

            throw new Error(message);
        }
    });
}
function validateEnvironment(environment, envContext, source = null) {

    // not having an environment is ok
    if (!environment) {
        return;
    }

    Object.keys(environment).forEach(env => {
        if (!envContext.get(env)) {
            const message = `${source}:\n\tEnvironment key "${env}" is unknown\n`;

            throw new Error(message);
        }
    });
}
function validateEnvironment ( environment , envContext , source = null ) { // not having an environment is ok if ( ! environment ) { return ; } Object . keys ( environment ) . forEach ( env => { if ( ! envContext . get ( env ) ) { const message = ` ${ source } \n \t ${ env } \n ` ; throw new Error ( message ) ; } } ) ; }
Validates an environment object
@param {Object} environment The environment config object to validate.
@param {Environments} envContext Env context
@param {string} source The name of the configuration source to report in any errors.
@returns {void}
Validates an environment object
Validate an environment