qlaffont/env-vars-validator

View on GitHub
example/index.js

Summary

Maintainability
A
0 mins
Test Coverage
const { validateEnv } = require('env-vars-validator');

validateEnv(
  {
    NODE_ENV: { type: 'string' },
    PORT: { type: 'integer' },
  },
  {
    requiredProperties: ['NODE_ENV'],
  },
);