Skip to content

v1.0.0

Choose a tag to compare

@nzakas nzakas released this 24 Jul 17:57

Overview

This version updates the require() method and the required property so both will throw not only when an environment variable doesn't exist, but also when the environment variable is an empty string. While this is an unlikely scenario in local development, it becomes more likely when using a continuous integration (CI) environment where you often need to define environment variable values in a location separate from where they are used. These changes help to identify such problems.

For backwards compatibility, a new exists property was added that works the same as required in versions prior to v1.0.0. Additionally, a new has() method was added to allow you to check for the existence of an environment variable directly.

Changelog