1 | # Deprecated
|
2 |
|
3 | This is not needed anymore. Use `require('os').homedir()` instead.
|
4 |
|
5 | ---
|
6 |
|
7 |
|
8 | # os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir)
|
9 |
|
10 | > Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com)
|
11 |
|
12 |
|
13 | ## Install
|
14 |
|
15 | ```
|
16 | $ npm install --save os-homedir
|
17 | ```
|
18 |
|
19 |
|
20 | ## Usage
|
21 |
|
22 | ```js
|
23 | const osHomedir = require('os-homedir');
|
24 |
|
25 | console.log(osHomedir());
|
26 | //=> '/Users/sindresorhus'
|
27 | ```
|
28 |
|
29 |
|
30 | ## Related
|
31 |
|
32 | - [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result
|
33 | - [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory
|
34 |
|
35 |
|
36 | ## License
|
37 |
|
38 | MIT © [Sindre Sorhus](https://sindresorhus.com)
|