Cross-Platform Environment Variable Test

JSON →
library 0.1.1 ·javascript maintenance
verified Apr 19, 2026

cross-env-test is a command-line utility designed to provide a cross-platform method for checking environment variable values within npm scripts or CI/CD pipelines. It allows users to test if a specified environment variable is set to a particular value, exiting with a `0` (success) status code if the condition is met, and a non-zero (failure) code otherwise. This enables conditional execution of scripts, for example, running a build step only when not in a test environment. The current stable version is 0.1.1. Due to its minimal scope and stable functionality, it typically experiences an infrequent release cadence. Its key differentiator is simplifying cross-platform environment variable checks without requiring complex shell-specific logic or full JavaScript execution for simple comparisons, making npm scripts more robust across Windows, macOS, and Linux.

total hits 29
actors 9 distinct systems
last hit 3d ago Amazonbot
ByteDance
9
Amazonbot
3
MetaBot
3
GPTBot
2
Script
2
ClaudeBot
1
Search engines
1

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇩🇪 Germany · 🇨🇦 Canada · 🇮🇳 India