New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

user-home

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

user-home - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

8

package.json
{
"name": "user-home",
"version": "2.0.0",
"version": "3.0.0",
"description": "Get the path to the user home directory",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "node test.js"
"test": "ava"
},

@@ -41,5 +41,5 @@ "files": [

"devDependencies": {
"ava": "0.0.4",
"path-exists": "^1.0.0"
"ava": "*",
"path-exists": "^2.0.0"
}
}

@@ -1,3 +0,7 @@

# user-home [![Build Status](https://travis-ci.org/sindresorhus/user-home.svg?branch=master)](https://travis-ci.org/sindresorhus/user-home)
Deprecated. Just use `import {homedir} from 'os';`.
---
# user-home
> Get the path to the user home directory

@@ -9,3 +13,3 @@

```
$ npm install --save user-home
$ npm install user-home
```

@@ -17,3 +21,3 @@

```js
var userHome = require('user-home');
const userHome = require('user-home');

@@ -27,2 +31,9 @@ console.log(userHome);

## FAQ
### Why not just use the `os-home` module?
This module was made long before [`os-homedir`](https://github.com/sindresorhus/os-homedir). When Node.js decided to add a native method for getting the user's home directory, I made a polyfill matching its API and decided to depend on it here, so not to have duplicate code. The main reason this one is still around is that lots of modules depend on it and I see no reason to inconvenience dependents by deprecating this. This one also gets the home directory on startup and returns a string rather than exposing a method, so it's faster, and I prefer this API. [Modules are cheap in Node.js](https://github.com/sindresorhus/ama/issues/10#issuecomment-117766328), so doesn't matter. Use whichever you prefer. I'm going to continue using this one.
## Related

@@ -34,4 +45,12 @@

## License
---
MIT © [Sindre Sorhus](http://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-user-home?utm_source=npm-user-home&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc