{ "name": "xdg-basedir", "version": "2.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": ">=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" }, "readme": "# xdg-basedir [![Build Status](https://travis-ci.org/sindresorhus/xdg-basedir.svg?branch=master)](https://travis-ci.org/sindresorhus/xdg-basedir)\n\n> Get [XDG Base Directory](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) paths\n\n\n## Install\n\n```\n$ npm install --save xdg-basedir\n```\n\n\n## Usage\n\n```js\nvar xdgBasedir = require('xdg-basedir');\n\nxdgBasedir.data;\n//=> '/home/sindresorhus/.local/share'\n\nxdgBasedir.config;\n//=> '/home/sindresorhus/.config'\n\nxdgBasedir.dataDirs\n//=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/']\n```\n\n\n## API\n\nThe properties `.data`, `.config`, `.cache`, `.runtime` will return `null` 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 temp directory](https://github.com/yeoman/configstore/blob/b82690fc401318ad18dcd7d151a0003a4898a314/index.js#L15).\n\n### .data\n\nDirectory for user specific data files.\n\n### .config\n\nDirectory for user specific configuration files.\n\n### .cache\n\nDirectory for user specific non-essential data files.\n\n### .runtime\n\nDirectory for user-specific non-essential runtime files and other file objects (such as sockets, named pipes, etc).\n\n### .dataDirs\n\nPreference-ordered array of base directories to search for data files in addition to `.data`.\n\n### .configDirs\n\nPreference-ordered array of base directories to search for configuration files in addition to `.config`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", "readmeFilename": "readme.md", "bugs": { "url": "https://github.com/sindresorhus/xdg-basedir/issues" }, "homepage": "https://github.com/sindresorhus/xdg-basedir#readme", "_id": "xdg-basedir@2.0.0", "_shasum": "edbc903cc385fc04523d966a335504b5504d1bd2", "_resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", "_from": "xdg-basedir@>=2.0.0 <3.0.0" }