Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

os-homedir

sindresorhus37.4mMITdeprecated2.0.0TypeScript support: definitely-typed

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

Node.js 4 os.homedir() ponyfill

builtin, core, ponyfill, polyfill, shim, os, homedir, home, dir, directory, folder, user, path

readme

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'
  • 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