Comparing version 2.0.0 to 3.0.0
{ | ||
"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 [](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> |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
3735
53
1