function validateEnvironment(environment,source){// not having an environment is ok
if(!environment){return;}if(Array.isArray(environment)){throw new Error("Environment must not be an array");}if((typeof environment==="undefined"?"undefined":_typeof(environment))==="object"){(0,_keys4.default)(environment).forEach(function(env){if(!Environments.get(env)){var message=[source,":\n","\tEnvironment key \"",env,"\" is unknown\n"];throw new Error(message.join(""));}});}else{throw new Error("Environment must be an object");}}
Validates an environment object
@param {Object} environment The environment config object to validate.
@param {string} source The location to report with any errors.
@returns {void}