Skip to content

node-modules/node-homedir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-homedir

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.

Reference Issue

NPM version CI Test coverage Known Vulnerabilities npm download

Installation

npm install node-homedir

Usage

Commonjs

const { homedir } = require('node-homedir');

console.log(homedir());

ESM & TypeScript

import { homedir } from 'node-homedir';

console.log(homedir());

License

MIT