Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sindresorhus/os-homedir
- Owner: sindresorhus
- License: mit
- Archived: true
- Created: 2015-05-11T12:04:43.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2021-01-24T06:12:50.000Z (about 4 years ago)
- Last Synced: 2025-01-14T19:55:00.503Z (12 days ago)
- Topics: deprecated, homedir, javascript, nodejs, ponyfill
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 61
- Watchers: 8
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
- Security: .github/security.md
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.