diff --git a/doc/api/os.md b/doc/api/os.md index 80c97e84afb14d..acd37e6a6f5b29 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -215,6 +215,14 @@ added: v2.3.0 The `os.homedir()` method returns the home directory of the current user as a string. +**POSIX**: +Will use the `$HOME` environment variable if defined. Otherwise, it will use +the [effective UID][EUID] to look up the user's home directory. + +**Windows**: +Will use the `USERPROFILE` environment variable if defined. Otherwise it +will be the path to the profile directory of the current user. + ## os.hostname()