# os-homedir

> Node.js 4 `os.homedir()` ponyfill

Latest version **2.0.0** (published 2018-11-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install os-homedir
pnpm add os-homedir
yarn add os-homedir
bun add os-homedir
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-11-08 |
| First published | 2015-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/os-homedir) |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 59 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | builtin, core, ponyfill, polyfill, shim, os, homedir, home, dir, directory, folder, user, path |

## Links

- npm: https://www.npmjs.com/package/os-homedir
- Repository: https://github.com/sindresorhus/os-homedir
- Homepage: https://github.com/sindresorhus/os-homedir#readme
- Issues: https://github.com/sindresorhus/os-homedir/issues
- npm.io page: https://npm.io/package/os-homedir

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-11-08
- 1.0.2 — 2016-09-30
- 1.0.1 — 2015-07-20
- 1.0.0 — 2015-06-13
- 0.1.0 — 2015-05-11

## README

# Deprecated

This is not needed anymore. Use `require('os').homedir()` instead.

---


# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir)

> Node.js 4 [`os.homedir()`](https://nodejs.org/api/os.html#os_os_homedir) [ponyfill](https://ponyfill.com)


## Install

```
$ npm install --save os-homedir
```


## Usage

```js
const osHomedir = require('os-homedir');

console.log(osHomedir());
//=> '/Users/sindresorhus'
```


## Related

- [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result
- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

---
_Source: https://npm.io/package/os-homedir · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
