os-homedir

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


Keywords
builtin, core, ponyfill, polyfill, shim, os, homedir, home, dir, directory, folder, user, path, deprecated, javascript, nodejs
License
MIT
Install
npm install os-homedir@2.0.0

Documentation

Deprecated

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


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