{"name":"appdirsjs","version":"1.1.0","description":"OS-dependent application paths for cache, data and config directories","keywords":[],"license":"MIT","author":{"name":"Denis Gruzdev","email":"codingjerk@gmail.com"},"private":false,"repository":{"type":"git","url":"git+https://github.com/codingjerk/appdirsjs.git"},"scripts":{"build":"tsc","lint":"eslint src/**/*.ts","test":"jest --coverage"},"main":"dist/index.js","types":"dist/index.d.ts","devDependencies":{"@types/jest":"^26.0.15","@typescript-eslint/eslint-plugin":"^4.5.0","@typescript-eslint/parser":"^4.5.0","eslint":"^7.11.0","jest":"^26.6.1","ts-jest":"^26.4.2","typescript":"^4.0.3"},"gitHead":"a9d7e3fec235d2a91830ea7639fb3cd1fca1aafa","bugs":{"url":"https://github.com/codingjerk/appdirsjs/issues"},"homepage":"https://github.com/codingjerk/appdirsjs#readme","_id":"appdirsjs@1.1.0","_nodeVersion":"15.0.1","_npmVersion":"7.0.3","dist":{"integrity":"sha512-T3rk0yGhuXP2edQQxxKkKKFQ2jSRKknAHpGrATKz105sgNw9PInETOdubCJ4QPPFXCCD1NWwvdEfRIO5KDclJQ==","shasum":"b98d6b8b32fd4bbe002b7feb8e93de82e1ea6e9c","tarball":"http://registry-npm.ywwl.com/appdirsjs/download/appdirsjs-1.1.0.tgz","fileCount":16,"unpackedSize":14572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfne6oCRA9TVsSAnZWagAAhmoQAI7zZ5xag3UpunZ0BIXo\ni24e0e1jRMbRey+b3PYvRoTGhQ5cwKeABtpGo5lUiBYTNBJQ9/MkivT2tYjC\nkC+WkRXh47BE9i0f64kv/k0gCXm7uIGdwKfgkYR1Kzs2B/FgTpLf8XWDU3VQ\nr2As2Yopbth3VbXquC/DNk9yvFAgCrZ9eagJelQGkoeHhz3A2kg7nLxqYFzt\n/pUAdYoZJox3wc/iaFZiuPRXG/n4hZKdwJ722BuQWyTF76+1ZxPtHn/I3RIj\nUTfxd+8RfZc+S2w3H9+edE6nb6DbeIH9FQPQsANwmYwn8IeBKWLPRZOWBDgU\nue/kkl64vvTBm2Fw8sO1/BIVtxV8oOU68Ib/XYHdRQqG5y3aKiBfh8RszSt0\nLUZv1yI1rC0JViT4Jxtm5rQQIHl8nXdMC+jSi35eJbe2ErCyBqC74XUo+7dN\nw9fPhM6nFFxtZS2kt+2QFpC/InxQTU6zYYkqb4FR1HPr+mraAWSZsgbqnn5J\nHFfwdBQCuM4M5yTtcKJYMcvv+pFM720kG3Nf0KO9FwN8bhTCZ4pQrs864IEk\nHopCWgqqMvL4SOGpZQykpiRZtdm8nm/EpTEdl23oE45es6J/C7MaoknhUjwY\nCevnMDwGT8+ilZazcNUG7qu7TVEqvh1ng3s82h6wxFeMrVUQXbqxv/W3ks17\n2yhN\r\n=ee0y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGydH7etSF4F8j8GVMnFofMCFpkDTEH5eAFnp1aFtt0+AiA9d1u3KK0ZuLCvbUiU7pzIYmyEH+E4zN+MDb3HavfveA=="}],"size":4796,"noattachment":false,"key":"/appdirsjs/-/appdirsjs-1.1.0.tgz"},"maintainers":[{"name":"codingjerk","email":"codingjerk@gmail.com"}],"_npmUser":{"name":"codingjerk","email":"codingjerk@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/appdirsjs_1.1.0_1604185767892_0.9223118489505551"},"_hasShrinkwrap":false,"readme":"# appdirsjs\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/codingjerk/appdirsjs/ci)](https://github.com/codingjerk/appdirsjs/actions)\n[![Codecov](https://img.shields.io/codecov/c/gh/codingjerk/appdirsjs)](https://codecov.io/gh/codingjerk/appdirsjs)\n[![npm](https://img.shields.io/npm/v/appdirsjs)](https://www.npmjs.com/package/appdirsjs)\n[![npm bundle size](https://img.shields.io/bundlephobia/min/appdirsjs)](https://www.npmjs.com/package/appdirsjs)\n[![GitHub](https://img.shields.io/badge/license-MIT-blue)](https://github.com/codingjerk/appdirsjs/blob/master/_LICENSE.md)\n\nA node.js library to get paths to directories to store configs, caches and data according to OS standarts.\n\n## Installation\n\n```sh\nnpm install appdirsjs\n```\n\nor\n\n```sh\nyarn install appdirsjs\n```\n\nif you're using yarn.\n\n## Usage\n\n```javascript\nimport appDirs from \"appdirsjs\";\n\nconst dirs = appDirs({ appName: \"expo\" });\n\nconsole.log(dirs.cache);\n// /home/user/.cache/expo on Linux\n// /Users/User/Library/Caches/expo on MacOS\n// C:\\Users\\User\\AppData\\Local\\Temp\\expo on Windows\n\nconsole.log(dirs.config);\n// /home/user/.config/expo on Linux\n// /Users/User/Library/Preferences/expo on MacOS\n// C:\\Users\\User\\AppData\\Roaming\\expo\n\nconsole.log(dirs.data);\n// /home/user/.local/share/expo on Linux\n// /Users/User/Library/Application Support/expo on MacOS\n// C:\\Users\\User\\AppData\\Local\\expo\n```\n\n### Keep backward compability\n\nThen switching from old-style dotfile directory,\nsuch as `~/.myapp` to new, like `~/.config/myapp`,\nyou can pass `legacyPath` parameter\nto keep using old directory if it exists:\n\n```javascript\nimport * as path from \"path\";\nimport appDirs from \"appdirsjs\";\n\nconst dirs = appDirs({\n  appName: \"expo\",\n  // Notice usage of full path\n  legacyPath: path.join(os.homedir(), \".expo\"),\n});\n\nconsole.log(dirs.config);\n// /home/user/.expo\n```\n\n## TODO\n\n- [ ] Android support\n- [ ] XDG on BSD support\n","publish_time":1604185768055,"_cnpm_publish_time":1604185768055,"dist-tags":{"latest":"1.2.8"}}