{"_id":"user-home","_rev":"14436","name":"user-home","description":"Get the path to the user home directory","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-06-03T09:58:37.000Z","created":"2014-08-03T17:22:44.525Z","3.0.0":"2021-04-09T13:33:15.221Z","2.0.0":"2015-06-13T12:40:31.773Z","1.1.1":"2015-01-13T17:47:49.094Z","1.1.0":"2014-10-16T12:29:54.406Z","1.0.0":"2014-08-03T17:22:44.525Z"},"users":{"fgribreau":true,"jamescostian":true,"itonyyo":true,"jerkovicl":true,"akiva":true,"gvn":true,"jian263994241":true,"rbecheras":true,"dongxu":true,"adius":true,"axelrindle":true,"nickeltobias":true,"eijs":true,"wgerven":true,"nerdybeast":true,"gindis":true,"dyakovk":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/user-home.git"},"versions":{"3.0.0":{"name":"user-home","version":"3.0.0","description":"Get the path to the user home directory","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/user-home.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"ava"},"keywords":["user","home","homedir","os-homedir","dir","directory","folder","path","env","vars","environment","variables","userprofile"],"dependencies":{"os-homedir":"^1.0.0"},"devDependencies":{"ava":"*","path-exists":"^2.0.0"},"gitHead":"33df3e8c494d5515eac2a5f796ed9f2ec2d57c48","bugs":{"url":"https://github.com/sindresorhus/user-home/issues"},"homepage":"https://github.com/sindresorhus/user-home#readme","_id":"user-home@3.0.0","_nodeVersion":"15.12.0","_npmVersion":"7.5.4","dist":{"shasum":"25db577b1e4d51c42b1d0a7c9f4c23ee51347f05","size":2066,"noattachment":false,"key":"/user-home/-/user-home-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/user-home/download/user-home-3.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/user-home_3.0.0_1617975195114_0.9660582490495171"},"_hasShrinkwrap":false,"publish_time":1617975195221,"_cnpm_publish_time":1617975195221,"deprecated":"Deprecated. Just use `import {homedir} from os;`."},"2.0.0":{"name":"user-home","version":"2.0.0","description":"Get the path to the user home directory","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/user-home"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["user","home","homedir","os-homedir","dir","directory","folder","path","env","vars","environment","variables","userprofile"],"dependencies":{"os-homedir":"^1.0.0"},"devDependencies":{"ava":"0.0.4","path-exists":"^1.0.0"},"gitHead":"23e6d1e2dd553b599c787348f82bd2463225cc80","bugs":{"url":"https://github.com/sindresorhus/user-home/issues"},"homepage":"https://github.com/sindresorhus/user-home","_id":"user-home@2.0.0","_shasum":"9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f","size":1519,"noattachment":false,"key":"/user-home/-/user-home-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/user-home/download/user-home-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1434199231773,"_cnpm_publish_time":1434199231773,"_hasShrinkwrap":false},"1.1.1":{"name":"user-home","version":"1.1.1","description":"Get the path to the user home directory","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/user-home"},"bin":{"user-home":"cli.js"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js","cli.js"],"keywords":["cli","bin","user","home","homedir","dir","directory","folder","path"],"devDependencies":{"ava":"0.0.3"},"gitHead":"cf6ba885d3e6bf625fb3c15ad0334fa623968481","bugs":{"url":"https://github.com/sindresorhus/user-home/issues"},"homepage":"https://github.com/sindresorhus/user-home","_id":"user-home@1.1.1","_shasum":"2b5be23a32b63a7c9deb8d0f28d485724a3df190","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"2b5be23a32b63a7c9deb8d0f28d485724a3df190","size":1825,"noattachment":false,"key":"/user-home/-/user-home-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/user-home/download/user-home-1.1.1.tgz"},"directories":{},"publish_time":1421171269094,"_cnpm_publish_time":1421171269094,"_hasShrinkwrap":false},"1.1.0":{"name":"user-home","version":"1.1.0","description":"Get the path to the user home directory","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/user-home"},"bin":{"user-home":"cli.js"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js","cli.js"],"keywords":["cli","bin","user","home","homedir","dir","directory","folder","path"],"devDependencies":{"ava":"0.0.3"},"gitHead":"d4f279b9da79684fe1787f92bc52d2a372ef9856","bugs":{"url":"https://github.com/sindresorhus/user-home/issues"},"homepage":"https://github.com/sindresorhus/user-home","_id":"user-home@1.1.0","_shasum":"1f4e6bce5458aeec4ac80ebcdcc66119c1070cdf","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"1f4e6bce5458aeec4ac80ebcdcc66119c1070cdf","size":1100,"noattachment":false,"key":"/user-home/-/user-home-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/user-home/download/user-home-1.1.0.tgz"},"directories":{},"publish_time":1413462594406,"_cnpm_publish_time":1413462594406,"_hasShrinkwrap":false},"1.0.0":{"name":"user-home","version":"1.0.0","description":"Get the path to the user home directory","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/user-home"},"bin":{"user-home":"cli.js"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js","cli.js"],"keywords":["cli","bin","user","home","homedir","dir","directory","folder","path"],"devDependencies":{"ava":"0.0.3"},"gitHead":"26b9cfd8d28dccf0ca1703f84727d076f6aa5343","bugs":{"url":"https://github.com/sindresorhus/user-home/issues"},"homepage":"https://github.com/sindresorhus/user-home","_id":"user-home@1.0.0","_shasum":"54ecb631e0fa420e9b0a6b946b158d137825b38b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"54ecb631e0fa420e9b0a6b946b158d137825b38b","size":989,"noattachment":false,"key":"/user-home/-/user-home-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/user-home/download/user-home-1.0.0.tgz"},"directories":{},"publish_time":1407086564525,"_cnpm_publish_time":1407086564525,"_hasShrinkwrap":false}},"readme":"Deprecated. Just use `import {homedir} from 'os';`.\n\n---\n\n# user-home\n\n> Get the path to the user home directory\n\n\n## Install\n\n```\n$ npm install user-home\n```\n\n\n## Usage\n\n```js\nconst userHome = require('user-home');\n\nconsole.log(userHome);\n//=> '/Users/sindresorhus'\n```\n\nReturns `null` in the unlikely scenario that the home directory can't be found.\n\n\n## FAQ\n\n### Why not just use the `os-home` module?\n\nThis module was made long before [`os-homedir`](https://github.com/sindresorhus/os-homedir). When Node.js decided to add a native method for getting the user's home directory, I made a polyfill matching its API and decided to depend on it here, so not to have duplicate code. The main reason this one is still around is that lots of modules depend on it and I see no reason to inconvenience dependents by deprecating this. This one also gets the home directory on startup and returns a string rather than exposing a method, so it's faster, and I prefer this API. [Modules are cheap in Node.js](https://github.com/sindresorhus/ama/issues/10#issuecomment-117766328), so doesn't matter. Use whichever you prefer. I'm going to continue using this one.\n\n\n## Related\n\n- [user-home-cli](https://github.com/sindresorhus/user-home-cli) - CLI for this module\n- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory\n\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-user-home?utm_source=npm-user-home&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/user-home#readme","bugs":{"url":"https://github.com/sindresorhus/user-home/issues"},"license":"MIT"}