Skip to content

Releases: tnez/env

v0.2.0

20 Mar 14:44
b3cc043
Compare
Choose a tag to compare

Minor Changes

  • be08577: Add an option to throw if attempting to access an environment variable in the client that should only be accessed server-side.

    Example:

    /**
     * The following will throw an exception if run in the client.
     */
    const SECRET_API_KEY = getEnv("SECRET_API_KEY", { serverOnly: true });

v0.1.0

24 Feb 21:09
af4aefa
Compare
Choose a tag to compare

Minor Changes

  • 5e98a13: Allow specification of default value to return if key is not defined in process.env

    getEnv("NON_EXISTENT_KEY", { default: "default-value" });
    // ? 'default-value'

v0.0.1

24 Feb 20:13
70598d6
Compare
Choose a tag to compare

Patch Changes

  • 4280cda: fix(ci): issue with publish workflow
  • c38944d: chore(ci): add workflow to publish package