1 | ;
|
2 | function 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 |
|
16 | module.exports = validateEnvironmentVariables;
|