Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sindresorhus/os-homedir

[DEPRECATED] Node.js `os.homedir()` ponyfill
https://github.com/sindresorhus/os-homedir

deprecated homedir javascript nodejs ponyfill

Last synced: 8 days ago
JSON representation

[DEPRECATED] Node.js `os.homedir()` ponyfill

Awesome Lists containing this project

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

---



Get professional support for this package with a Tidelift subscription




Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.