Socket
Socket
Sign inDemoInstall

node-homedir

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-homedir

Get the effective user's homedir.


Version published
Weekly downloads
36K
decreased by-20.76%
Maintainers
2
Install size
7.92 kB
Created
Weekly downloads
 

Changelog

Source

2.0.0 (2023-10-05)

⚠ BREAKING CHANGES

  • Drop Node.js < 16 support

https://github.com/eggjs/egg/issues/5257

Features

1.1.1 / 2018-07-09

  • fix: ignore os.userInfo()'s ENOENT error

1.1.0 / 2017-10-12

  • feat: add MOCK_HOME_DIR for test

1.0.0 / 2016-11-04

* Release 1.0.0

Readme

Source

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

Keywords

FAQs

Last updated on 05 Oct 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc