Node.js 4.0 `os.homedir()` ponyfill
JavaScript
Latest commit b1b0ae7 Sep 29, 2016 @sindresorhus 1.0.2
Permalink
Failed to load latest commit information.
.editorconfig meta tweaks Sep 30, 2016
.gitattributes meta tweaks Sep 30, 2016
.gitignore init Jun 13, 2015
.travis.yml meta tweaks Sep 30, 2016
index.js fix root home without user environment variable Jul 20, 2015
license init Jun 13, 2015
package.json 1.0.2 Sep 30, 2016
readme.md meta tweaks Sep 30, 2016
test.js meta tweaks Sep 30, 2016

readme.md

os-homedir Build Status

Node.js 4 os.homedir() ponyfill

Install

$ npm install --save os-homedir

Usage

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

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

Related

  • user-home - Same as this module but caches the result
  • home-or-tmp - Get the user home directory with fallback to the system temp directory

License

MIT © Sindre Sorhus