You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

cross-var

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-var

[![NPM](https://nodei.co/npm/cross-var.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/cross-var/) [![NPM](https://nodei.co/npm-dl/cross-var.png?months=9&height=3)](https://nodei.co/npm/cross-var/)

1.1.0
latest
Version published
Weekly downloads
197K
-32.07%
Maintainers
1
Weekly downloads
 
Created

What is cross-var?

The cross-var npm package allows you to use environment variables across different operating systems in a consistent manner. It helps in writing cross-platform scripts by normalizing the usage of environment variables.

What are cross-var's main functionalities?

Cross-Platform Environment Variables

This feature allows you to use environment variables in your npm scripts in a way that works across different operating systems. The example shows how to echo the NODE_ENV variable.

scripts: {
  "start": "cross-var echo $NODE_ENV"
}

Variable Substitution

This feature allows you to substitute environment variables directly in your scripts. The example shows how to include the NODE_ENV variable in a build script.

scripts: {
  "build": "cross-var echo Building for $NODE_ENV"
}

Other packages similar to cross-var

Keywords

FAQs

Package last updated on 10 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts