c037de470c5f1988041deda851ffb3ad64a61341cc1710f2b5cd1b5c8a2c35d918a7408bf843aeaf69edf7e3b1513664a88fc80a7590e6e2aba22a1e01e6cb 647 B

1234567891011121314151617181920212223242526272829303132
  1. # home-or-tmp [![Build Status](https://travis-ci.org/sindresorhus/home-or-tmp.svg?branch=master)](https://travis-ci.org/sindresorhus/home-or-tmp)
  2. > Get the user home directory with fallback to the system temp directory
  3. Useful in cases where the home directory either isn't set or doesn't exist.
  4. ## Install
  5. ```
  6. $ npm install --save home-or-tmp
  7. ```
  8. ## Usage
  9. ```js
  10. var homeOrTmp = require('home-or-tmp');
  11. console.log(homeOrTmp);
  12. //=> '/Users/sindresorhus'
  13. // and if there's no home directory:
  14. console.log(homeOrTmp);
  15. //=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T'
  16. ```
  17. ## License
  18. MIT © [Sindre Sorhus](http://sindresorhus.com)