
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Look up environment settings specific to different operating systems.
var osenv = require('osenv')
var path = osenv.path()
var user = osenv.user()
// etc.
// Some things are not reliably in the env, and have a fallback command:
var h = osenv.hostname(function (er, hostname) {
h = hostname
})
// This will still cause it to be memoized, so calling osenv.hostname()
// is now an immediate operation.
// You can always send a cb, which will get called in the nextTick
// if it's been memoized, or wait for the fallback data if it wasn't
// found in the environment.
osenv.hostname(function (er, hostname) {
if (er) console.error('error looking up hostname')
else console.log('this machine calls itself %s', hostname)
})
The machine name. Calls hostname
if not found.
The currently logged-in user. Calls whoami
if not found.
Either PS1 on unix, or PROMPT on Windows.
The place where temporary files should be created.
No place like it.
An array of the places that the operating system will search for executables.
Return the executable name of the editor program. This uses the EDITOR
and VISUAL environment variables, and falls back to vi
on Unix, or
notepad.exe
on Windows.
The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' or 'cmd'.
This package provides functionality similar to osenv's home directory retrieval. Unlike osenv, os-homedir focuses solely on getting the user's home directory, making it a lighter alternative for projects that only need this specific functionality.
Similar to osenv's temporary directory feature, the tmp package offers enhanced capabilities for creating temporary files and directories. It provides more options for managing temporary files, such as automatic cleanup.
While osenv provides access to the user's shell, shelljs goes further by offering a portable Unix shell commands for Node.js. This allows for executing shell commands, which is more extensive than merely retrieving the shell environment.
FAQs
Look up environment settings specific to different operating systems
The npm package osenv receives a total of 3,821,404 weekly downloads. As such, osenv popularity was classified as popular.
We found that osenv demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.