Looks like a job for a new module.

When the module is loaded, a snapshot of `process.env` is created. The module exports a single function that can be used to reset the environment to the initial (saved) state.