JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 863278
  • Score
    100M100P100Q169207F
  • License ISC

Utilities for process object

Package Exports

  • process-utils/override-env

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (process-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

*nix build status Windows build status Tests coverage Transpilation status npm version

process-utils

Utilities for Node.js process handling

Installation

npm install process-utils

Available utilities

override-env

Overrides process.env for time of callback invocation. Helpful when testing modules which behavior relies on environment settings.

const overrideEnv = require("process-utls/override-env");

process.env.FOO = "bar";
overrideEnv(originalEnv => {
  // Exposes original `process.env` as first callback argument
  console.log(originalEnv.FOO); // "bar";
  // Current `process.env` points other (empty plain) object
  console.log(process.env.FOO); // undefined;
});
console.log(process.env.FOO); // "bar"

Tests

npm test