UNPKG

422 BJavaScriptView Raw
1'use strict';
2function validateEnvironmentVariables(environmentVariables) {
3 if (!environmentVariables) {
4 return {};
5 }
6
7 for (const value of Object.values(environmentVariables)) {
8 if (typeof value !== 'string') {
9 throw new TypeError('The ’environmentVariables’ configuration must be an object containing string values.');
10 }
11 }
12
13 return environmentVariables;
14}
15
16module.exports = validateEnvironmentVariables;