{"_id":"node-homedir","_rev":"4602859","name":"node-homedir","description":"Get the effective user's homedir.","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"ngot","email":""}],"time":{"modified":"2026-04-10T17:27:29.000Z","created":"2016-10-13T03:48:25.899Z","2.0.0":"2023-10-05T15:50:07.284Z","1.1.1":"2018-07-09T04:30:35.678Z","1.1.0":"2017-10-12T03:13:25.042Z","1.0.0":"2016-11-04T04:49:39.512Z","0.0.1":"2016-10-13T03:48:25.899Z"},"users":{},"author":{"name":"ngot"},"repository":{"type":"git","url":"git+https://github.com/node-modules/node-homedir.git"},"versions":{"2.0.0":{"name":"node-homedir","version":"2.0.0","description":"Get the effective user's homedir.","scripts":{"test":"npm run lint -- --fix && egg-bin test","lint":"eslint src test --ext ts","ci":"npm run lint && egg-bin cov && npm run prepublishOnly","contributor":"git-contributor","prepublishOnly":"tshy && tshy-after"},"repository":{"type":"git","url":"git+https://github.com/node-modules/node-homedir.git"},"keywords":["homedir","effective","node"],"author":{"name":"ngot"},"license":"MIT","bugs":{"url":"https://github.com/node-modules/node-homedir/issues"},"homepage":"https://github.com/node-modules/node-homedir#readme","devDependencies":{"@eggjs/tsconfig":"^1.3.3","@types/mocha":"^10.0.2","@types/node":"^20.8.2","egg-bin":"^6.5.2","eslint":"^8.50.0","eslint-config-egg":"^13.0.0","git-contributor":"^2.1.5","mm":"^3.3.0","tshy":"^1.2.2","tshy-after":"^1.0.0","typescript":"^5.2.2"},"engines":{"node":">=16.0.0"},"ci":{"version":"16, 18, 20"},"tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"type":"module","types":"./dist/commonjs/index.d.ts","_id":"node-homedir@2.0.0","gitHead":"fefa03df46626fa847d8909713fb329ebdfe9843","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"shasum":"3808aa416119a30a722503a287b36ddc02a365cf","size":3260,"noattachment":false,"key":"/node-homedir/-/node-homedir-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-homedir/download/node-homedir-2.0.0.tgz"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"directories":{},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"ngot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-homedir_2.0.0_1696521007045_0.036423233566792224"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-05T15:50:07.284Z","publish_time":1696521007284,"_source_registry_name":"default","_cnpm_publish_time":1696521007284},"1.1.1":{"name":"node-homedir","version":"1.1.1","description":"Get the effective user's homedir.","main":"index.js","scripts":{"test":"npm run lint && mocha -r intelli-espower-loader test/*.test.js","test-cov":"nyc mocha -r intelli-espower-loader test/*.test.js","lint":"eslint test *.js","ci":"npm run lint && npm run test-cov"},"repository":{"type":"git","url":"git+https://github.com/node-modules/node-homedir.git"},"keywords":["homedir","effective","node"],"author":{"name":"ngot"},"license":"MIT","bugs":{"url":"https://github.com/node-modules/node-homedir/issues"},"homepage":"https://github.com/node-modules/node-homedir#readme","devDependencies":{"eslint":"3","eslint-config-egg":"3","intelli-espower-loader":"^1.0.1","mm":"^2.0.0","mocha":"*","nyc":"^11.2.1","power-assert":"^1.4.1"},"files":["index.js"],"engines":{"node":">=4.0.0"},"ci":{"version":"4, 6, 8, 10"},"gitHead":"73f13cb4357e3196ebc136864751704afe203d6c","_id":"node-homedir@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"ngot","email":"zhuanghengfei@gmail.com"},"dist":{"shasum":"736db0b60e3bba8aba68df9927de40a7aabe1075","size":2149,"noattachment":false,"key":"/node-homedir/-/node-homedir-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-homedir/download/node-homedir-1.1.1.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"ngot","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-homedir_1.1.1_1531110635589_0.37495091339922637"},"_hasShrinkwrap":false,"publish_time":1531110635678,"_cnpm_publish_time":1531110635678},"1.1.0":{"name":"node-homedir","version":"1.1.0","description":"Get the effective user's homedir.","main":"index.js","scripts":{"test":"npm run lint && mocha -r intelli-espower-loader test/*.test.js","test-cov":"nyc mocha -r intelli-espower-loader test/*.test.js","lint":"eslint test *.js","ci":"npm run lint && npm run test-cov"},"repository":{"type":"git","url":"git+https://github.com/node-modules/node-homedir.git"},"keywords":["homedir","effective","node"],"author":{"name":"ngot"},"license":"MIT","bugs":{"url":"https://github.com/node-modules/node-homedir/issues"},"homepage":"https://github.com/node-modules/node-homedir#readme","devDependencies":{"eslint":"3","eslint-config-egg":"3","intelli-espower-loader":"^1.0.1","mm":"^2.0.0","mocha":"*","nyc":"^11.2.1","power-assert":"^1.4.1"},"files":["index.js","README.md"],"engines":{"node":">=4.0.0"},"ci":{"version":"4, 6"},"gitHead":"56219014d2936a5fe60601ad76958e1a6fb271a4","_id":"node-homedir@1.1.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"ngot","email":"zhuanghengfei@gmail.com"},"dist":{"shasum":"0ada30050df8923631b011f961395b382eb8c5cf","size":2054,"noattachment":false,"key":"/node-homedir/-/node-homedir-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-homedir/download/node-homedir-1.1.0.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"ngot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-homedir-1.1.0.tgz_1507778004953_0.4556952582206577"},"directories":{},"publish_time":1507778005042,"_hasShrinkwrap":false,"_cnpm_publish_time":1507778005042},"1.0.0":{"name":"node-homedir","version":"1.0.0","description":"Get the effective user's homedir.","main":"index.js","scripts":{"test":"npm run lint && mocha -t 15000 -r intelli-espower-loader test/*.test.js","test-cov":"istanbul cover _mocha -- -t 15000 -r intelli-espower-loader test/*.test.js","lint":"eslint test *.js","ci":"npm run lint && npm run test-cov"},"repository":{"type":"git","url":"git+https://github.com/node-modules/node-homedir.git"},"keywords":["homedir","effective","node"],"author":{"name":"ngot"},"license":"MIT","bugs":{"url":"https://github.com/node-modules/node-homedir/issues"},"homepage":"https://github.com/node-modules/node-homedir#readme","devDependencies":{"eslint":"3","eslint-config-egg":"3","intelli-espower-loader":"^1.0.1","istanbul":"*","mm":"^2.0.0","mocha":"*","power-assert":"^1.4.1"},"files":["index.js","README.md"],"engines":{"node":">=4.0.0"},"ci":{"version":"4, 6"},"gitHead":"d2f13e047e011e865507f22d00d02748bdc964e0","_id":"node-homedir@1.0.0","_shasum":"c636636e2d5047d0225eefb8db4b663e58594f49","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.0","_npmUser":{"name":"ngot","email":"zhuanghengfei@gmail.com"},"dist":{"shasum":"c636636e2d5047d0225eefb8db4b663e58594f49","size":2019,"noattachment":false,"key":"/node-homedir/-/node-homedir-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-homedir/download/node-homedir-1.0.0.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"ngot","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/node-homedir-1.0.0.tgz_1478234977458_0.7161178383976221"},"directories":{},"publish_time":1478234979512,"_cnpm_publish_time":1478234979512,"_hasShrinkwrap":false},"0.0.1":{"name":"node-homedir","version":"0.0.1","description":"Get the effective user's homedir.","main":"index.js","scripts":{"test":"npm run lint && mocha -t 15000 -r intelli-espower-loader test/*.test.js","test-cov":"istanbul cover _mocha -- -t 15000 -r intelli-espower-loader test/*.test.js","lint":"eslint test *.js","ci":"npm run lint && npm run test-cov"},"repository":{"type":"git","url":"git+https://github.com/node-modules/node-homedir.git"},"keywords":["homedir","effective","node"],"author":{"name":"ngot"},"license":"MIT","bugs":{"url":"https://github.com/node-modules/node-homedir/issues"},"homepage":"https://github.com/node-modules/node-homedir#readme","devDependencies":{"egg-ci":"~1.0.3","eslint":"3","eslint-config-egg":"3","intelli-espower-loader":"^1.0.1","istanbul":"*","mm":"^2.0.0","mocha":"*","power-assert":"^1.4.1"},"files":["index.js"],"engines":{"node":">=4.0.0"},"ci":{"version":"4, 6"},"gitHead":"7f112eeb2402ed3c561f9915f315fa2177cc0b0f","_id":"node-homedir@0.0.1","_shasum":"8ecae27633ba917fda0bc2c12a8a2ed7cca3dbd3","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"ngot","email":"zhuanghengfei@gmail.com"},"dist":{"shasum":"8ecae27633ba917fda0bc2c12a8a2ed7cca3dbd3","size":1398,"noattachment":false,"key":"/node-homedir/-/node-homedir-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-homedir/download/node-homedir-0.0.1.tgz"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"ngot","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/node-homedir-0.0.1.tgz_1476330505056_0.5042987801134586"},"directories":{},"publish_time":1476330505899,"_cnpm_publish_time":1476330505899,"_hasShrinkwrap":false}},"readme":"# node-homedir\n\nGet the effective user's homedir, if Node.js >= v16.0.0 .\n\nAlways return the homedir of the current executor， even execute with `sudo -u [user] node app.js` without `-i`.\n\n[Reference Issue](https://github.com/nodejs/node/issues/5582)\n\n[![NPM version][npm-image]][npm-url]\n[![CI](https://github.com/node-modules/node-homedir/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/node-homedir/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/node-homedir.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/node-homedir\n[codecov-image]: https://codecov.io/github/node-modules/node-homedir/coverage.svg?branch=master\n[codecov-url]: https://codecov.io/github/node-modules/node-homedir?branch=master\n[snyk-image]: https://snyk.io/test/npm/node-homedir/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/node-homedir\n[download-image]: https://img.shields.io/npm/dm/node-homedir.svg?style=flat-square\n[download-url]: https://npmjs.org/package/node-homedir\n\n## Installation\n\n```bash\nnpm install node-homedir\n```\n\n## Usage\n\nCommonjs\n\n```js\nconst { homedir } = require('node-homedir');\n\nconsole.log(homedir());\n```\n\nESM & TypeScript\n\n```ts\nimport { homedir } from 'node-homedir';\n\nconsole.log(homedir());\n```\n\n## License\n\n[MIT](LICENSE)\n","_attachments":{},"homepage":"https://github.com/node-modules/node-homedir#readme","bugs":{"url":"https://github.com/node-modules/node-homedir/issues"},"license":"MIT"}