{"_id":"xdg-basedir","_rev":"486643","name":"xdg-basedir","description":"Get XDG Base Directory paths","dist-tags":{"latest":"5.1.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-08-05T17:35:44.000Z","created":"2014-10-06T12:42:04.417Z","5.1.0":"2021-08-05T17:30:36.455Z","5.0.1":"2021-04-05T08:30:05.149Z","5.0.0":"2021-04-05T07:48:35.908Z","4.0.0":"2019-04-30T04:09:47.550Z","3.0.0":"2017-02-13T09:32:24.818Z","2.0.0":"2015-06-13T12:47:10.440Z","1.0.1":"2015-01-13T17:57:21.801Z","1.0.0":"2014-10-06T12:42:04.417Z"},"users":{"julien-f":true,"itonyyo":true,"chocolateboy":true,"akiva":true,"jessaustin":true,"danielbayley":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/xdg-basedir.git"},"versions":{"5.1.0":{"name":"xdg-basedir","version":"5.1.0","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/xdg-basedir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["xdg","base","directory","basedir","path","data","config","cache","linux","unix","spec"],"devDependencies":{"ava":"^1.4.1","import-fresh":"^3.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"ava":{"serial":true},"gitHead":"8cceade858e4da18cb971bf1844f086e9e213563","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir#readme","_id":"xdg-basedir@5.1.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"shasum":"1efba19425e73be1bc6f2a6ceb52a3d2c884c0c9","size":2624,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-5.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-5.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xdg-basedir_5.1.0_1628184636227_0.6668901574190473"},"_hasShrinkwrap":false,"publish_time":1628184636455,"_cnpm_publish_time":1628184636455},"5.0.1":{"name":"xdg-basedir","version":"5.0.1","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/xdg-basedir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["xdg","base","directory","basedir","path","data","config","cache","linux","unix","spec"],"devDependencies":{"ava":"^1.4.1","import-fresh":"^3.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"ava":{"serial":true},"gitHead":"3fc64a8f2476dd22b5a70a0f5978076e05c9dc49","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir#readme","_id":"xdg-basedir@5.0.1","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b8900938336874b2efacaf8a2d5ad3d65fe0ca7d","size":2593,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-5.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-5.0.1.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xdg-basedir_5.0.1_1617611404993_0.024172589241229447"},"_hasShrinkwrap":false,"publish_time":1617611405149,"_cnpm_publish_time":1617611405149},"5.0.0":{"name":"xdg-basedir","version":"5.0.0","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/xdg-basedir.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["xdg","base","directory","basedir","path","data","config","cache","linux","unix","spec"],"devDependencies":{"ava":"^1.4.1","import-fresh":"^3.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"ava":{"serial":true},"gitHead":"47109e5e93484fe9e07c4ed19a9458baf8b9c845","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir#readme","_id":"xdg-basedir@5.0.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"435b5b342501e23b8b876d5567acf650b187d935","size":2601,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xdg-basedir_5.0.0_1617608915772_0.6350504480753574"},"_hasShrinkwrap":false,"publish_time":1617608915908,"_cnpm_publish_time":1617608915908},"4.0.0":{"name":"xdg-basedir","version":"4.0.0","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/xdg-basedir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["xdg","base","directory","basedir","path","data","config","cache","linux","unix","spec"],"devDependencies":{"ava":"^1.4.1","import-fresh":"^3.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"bc65ded91e797cbdedbe3e5e1a2882372e3ba983","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir#readme","_id":"xdg-basedir@4.0.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"4bc8d9984403696225ef83a1573cbbcb4e79db13","size":2292,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xdg-basedir_4.0.0_1556597386863_0.809265814738712"},"_hasShrinkwrap":false,"publish_time":1556597387550,"_cnpm_publish_time":1556597387550},"3.0.0":{"name":"xdg-basedir","version":"3.0.0","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/xdg-basedir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["xdg","base","directory","dir","basedir","path","data","config","cache","linux","unix","spec"],"devDependencies":{"ava":"*","require-uncached":"^1.0.2","xo":"*"},"gitHead":"d441833e9dad9694b04495905ab8fe484e3b8b99","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir#readme","_id":"xdg-basedir@3.0.0","_shasum":"496b2cc109eca8dbacfe2dc72b603c17c5870ad4","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"496b2cc109eca8dbacfe2dc72b603c17c5870ad4","size":2081,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/xdg-basedir-3.0.0.tgz_1486978344594_0.5195651547983289"},"directories":{},"publish_time":1486978344818,"_cnpm_publish_time":1486978344818,"_hasShrinkwrap":false},"2.0.0":{"name":"xdg-basedir","version":"2.0.0","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/xdg-basedir"},"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":["xdg","base","directory","dir","basedir","path","data","config","cache","linux","unix","spec"],"dependencies":{"os-homedir":"^1.0.0"},"devDependencies":{"ava":"0.0.4","require-uncached":"^1.0.2"},"gitHead":"0ad9e461ca531fcc1532c66932df386739aeffb2","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir","_id":"xdg-basedir@2.0.0","_shasum":"edbc903cc385fc04523d966a335504b5504d1bd2","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"edbc903cc385fc04523d966a335504b5504d1bd2","size":2091,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1434199630440,"_cnpm_publish_time":1434199630440,"_hasShrinkwrap":false},"1.0.1":{"name":"xdg-basedir","version":"1.0.1","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/xdg-basedir"},"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"],"keywords":["xdg","base","directory","dir","basedir","path","data","config","cache"],"dependencies":{"user-home":"^1.0.0"},"devDependencies":{"ava":"0.0.4","require-uncached":"^1.0.2"},"gitHead":"2eaf176e5d0c9c1bd64e6fc8a60a3a8e3dba4e79","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir","_id":"xdg-basedir@1.0.1","_shasum":"14ff8f63a4fdbcb05d5b6eea22b36f3033b9f04e","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"14ff8f63a4fdbcb05d5b6eea22b36f3033b9f04e","size":2076,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-1.0.1.tgz"},"directories":{},"publish_time":1421171841801,"_cnpm_publish_time":1421171841801,"_hasShrinkwrap":false},"1.0.0":{"name":"xdg-basedir","version":"1.0.0","description":"Get XDG Base Directory paths","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/xdg-basedir"},"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"],"keywords":["xdg","base","directory","dir","basedir","path","data","config","cache"],"dependencies":{"user-home":"^1.0.0"},"devDependencies":{"ava":"0.0.4","require-uncached":"^1.0.2"},"gitHead":"8116a2fd05718de88b740861764739dc1879916f","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"homepage":"https://github.com/sindresorhus/xdg-basedir","_id":"xdg-basedir@1.0.0","_shasum":"95ea42a738d98a9470fd5a21d08556dbd61dc74a","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"95ea42a738d98a9470fd5a21d08556dbd61dc74a","size":1143,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xdg-basedir/download/xdg-basedir-1.0.0.tgz"},"directories":{},"publish_time":1412599324417,"_cnpm_publish_time":1412599324417,"_hasShrinkwrap":false}},"readme":"# xdg-basedir\n\n> Get [XDG Base Directory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) paths\n\nThis package is meant for Linux. You should not use XDG on macOS or Windows. Instead, you should follow their platform conventions. You can use [`env-paths`](https://github.com/sindresorhus/env-paths) for that.\n\n## Install\n\n```\n$ npm install xdg-basedir\n```\n\n## Usage\n\n```js\nimport {xdgData, xdgConfig, xdgDataDirectories} from 'xdg-basedir';\n\nconsole.log(xdgData);\n//=> '/home/sindresorhus/.local/share'\n\nconsole.log(xdgConfig);\n//=> '/home/sindresorhus/.config'\n\nconsole.log(xdgDataDirectories);\n//=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/']\n```\n\n## API\n\nThe exports `xdgData`, `xdgConfig`, `xdgCache`, `xdgRuntime` will return `undefined` in the uncommon case that both the XDG environment variable is not set and the users home directory can't be found. You need to handle this case. A common solution is to [fall back to a temporary directory](https://github.com/yeoman/configstore/blob/b82690fc401318ad18dcd7d151a0003a4898a314/index.js#L15).\n\n### xdgData\n\nDirectory for user-specific data files.\n\n### xdgConfig\n\nDirectory for user-specific configuration files.\n\n### xdgState\n\nDirectory for user-specific state files.\n\n### xdgCache\n\nDirectory for user-specific non-essential data files.\n\n### xdgRuntime\n\nDirectory for user-specific non-essential runtime files and other file objects (such as sockets, named pipes, etc).\n\n### xdgDataDirectories\n\nPreference-ordered array of base directories to search for data files in addition to `xdgData`.\n\n### xdgConfigDirectories\n\nPreference-ordered array of base directories to search for configuration files in addition to `xdgConfig`.\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-xdg-basedir?utm_source=npm-xdg-basedir&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/xdg-basedir#readme","bugs":{"url":"https://github.com/sindresorhus/xdg-basedir/issues"},"license":"MIT"}