{"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":{"integrity":"sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==","shasum":"4bc8d9984403696225ef83a1573cbbcb4e79db13","tarball":"http://registry-npm.ywwl.com/xdg-basedir/download/xdg-basedir-4.0.0.tgz","fileCount":5,"unpackedSize":5693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcx8qMCRA9TVsSAnZWagAAXYcQAJBYvVO5Ga+5eLBnXIoN\n9S7SxuKKQlMPGsyAzVVwNiKCqN4rb0EZ8MRiVvZbqdccaqTP/Zk0X3SxXyCZ\nRxNpYAA+uIDNkcf0NbzF49svPw6493dJp7qdCPcVzfzSegjLBaFKadglDEg9\nL7d1zQ+muR7/FWstWr8nUhezpOKn9Di6Rw5ngmUDQ/uqWppqk6vqpcz2yPKW\nVmUvRyYsUIoyTF9Xb4YOlhtmI/VI8n7iT4/0/1Uy1+P81+JN8ROJP1bF2Pca\npKuuQ7XoZpd5AJSWeJwpAjLHzHkc73YjQ+i7BN+wkQXBoI3zkMXWY4OgKV/i\nm7cp+hF3/+1AHSd7gQ+2w8wYrjpg+s7a3PQxGE+Yz6V0lO/jZ7w+7qj5m5Aa\nDTmWig9SbCoMjW7/0JLQfEAtOvUw1qidrj59/rJlQRJ+16/kzpC8qz4k+0J8\nNQR8CjYi/E+WyllqrIIDp7W3aOrlq5YEjzpEGAWuLaZr2QQsMCQm4pTIC+v1\nImgr+GFPoZxpl8JuU9iWbp2fv16ESMhRgUsb5iR6TN1KVittjLHrn36cban1\nm0R/5colnO/1Oh3bFtoekXJ1AeDpNUCIHM/3k4qPm+j5wT2DfMXieykN846x\nBT2Stjbf64PkuCcrT10fHnQd8Sv7g0RL/EP7HBOFBHJbFqMxRAwTP/7Tw761\nUAZJ\r\n=zFLM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDgORhdOC2OKHuXd/16wLVGjuVlc8RCnNFODlgmJqiEZAiAVdG/Bt7QFQFgR3Qll4jpGQWOglCe8RCkdEqIuwy5qPQ=="}],"size":2292,"noattachment":false,"key":"/xdg-basedir/-/xdg-basedir-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xdg-basedir_4.0.0_1556597386863_0.809265814738712"},"_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","publish_time":1556597387550,"_cnpm_publish_time":1556597387550,"dist-tags":{"latest":"5.1.0"}}