# userhome

> A cross-platform path to the user's home

Latest version **1.0.1** (published 2024-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install userhome
pnpm add userhome
yarn add userhome
bun add userhome
```

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-10-07 |
| First published | 2013-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Kyle Robinson Young |
| Maintainers | shama |
| Keywords | userhome, user, home, homedir, path |

## Links

- npm: https://www.npmjs.com/package/userhome
- Repository: https://github.com/shama/userhome
- Issues: https://github.com/shama/userhome/issues
- npm.io page: https://npm.io/package/userhome

## 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

- 1.0.1 (latest) — 2024-10-07
- 1.0.0 — 2014-09-23
- 0.1.0 — 2013-05-25

## README

# userhome

> A cross-platform (OSX, Windows, Linux) path to the user's home.

```js
var userhome = require('userhome');

console.log(userhome('.bashrc'));
// /Users/shama/.bashrc

console.log(userhome('test', 'sub', 'file'));
// /Users/shama/test/sub/file

console.log(userhome());
// C:\Users\shama
```

> If a valid user home environment variable could not be found an error will be thrown indicating so.

## Release History
* 1.0.1 - Fix license in package.json.
* 1.0.0 - Throws an error if a user home can not be found.
* 0.1.0 - initial release

## License
Copyright (c) 2024 Kyle Robinson Young  
Licensed under the MIT license.

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