Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

windows-env

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windows-env

Normalized environment variables for Windows XP and up

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
748
-43.07%
Maintainers
1
Weekly downloads
 
Created
Source

windows-env

Normalized environment variables for Windows XP and up.

npm status Build status Dependency status

example

const env = require('windows-env')

console.log('32-bit Program Files: %s', env.PROGRAMFILES_X86)

// This is true even if you run it with 32-bit Node.js
if (env.X64) {
  console.log('64-bit Program Files: %s', env.PROGRAMFILES_X64)
}

exports

All of process.env uppercased, and:

  • PROGRAMFILES_X86: C:\Program Files (x86) on 64 bit Windows, else C:\Program Files
  • PROGRAMFILES_X64: C:\Program Files on 64 bit Windows, else undefined
  • USERPROFILE: USERPROFILE or HOMEDRIVE + HOMEPATH
  • LOCALAPPDATA: this is usually USERPROFILE\AppData\Local, falls back to USERPROFILE\Local Settings\Application Data for Windows XP
  • X64: true on 64 bit Windows, regardless of node's bitness

install

With npm do:

npm install windows-env

license

MIT © Vincent Weevers

Keywords

appdata

FAQs

Package last updated on 12 Mar 2016

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