Created
June 17, 2016 00:25
-
-
Save ianstarz/cb5e6e25b3db6f85720244f8ac7d997e to your computer and use it in GitHub Desktop.
Node function to get the user's home directory on mac and windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function() { | |
return process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment