package
Get the effective user's homedir.
npm install node-homedirGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
7.9 kB
Includes dependencies.
Get the effective user's homedir, if Node.js >= v16.0.0 .
Always return the homedir of the current executor, even execute with sudo -u [user] node app.js without -i.
npm install node-homedirCommonjs
const { homedir } = require('node-homedir');
console.log(homedir());ESM & TypeScript
import { homedir } from 'node-homedir';
console.log(homedir());fengmk2
fengmk2@gmail.com