@cjser/home-or-tmp
v4.0.0-cjser.2
Published
Get the user home directory with fallback to the system temp directory
Maintainers
Readme
home-or-tmp
Get the user home directory with fallback to the system temp directory
Useful in cases where the home directory either isn't set or doesn't exist.
Install
$ npm install home-or-tmpUsage
import homeOrTemp from 'home-or-tmp';
console.log(homeOrTemp);
//=> '/Users/sindresorhus'
// And if there is no home directory:
console.log(homeOrTemp);
//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T'cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/home-or-tmp
