{"name":"appdirsjs","version":"1.2.3","description":"OS-dependent application paths for cache, data and config directories","license":"MIT","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":"025ae4b70d29b3dee0caf1b564e4f2bfbc7e7af0","_id":"appdirsjs@1.2.3","_nodeVersion":"15.2.1","_npmVersion":"7.0.8","dist":{"integrity":"sha512-l9k2N/nsc1Gu2jnLWWfSmGnIztjIqYk2OWx6M/H0RZ32g54vOqj/oF30T03CLYydrqPtkeoY5IPZstrbbT6niQ==","shasum":"6ca7bc6f6731b94016a6654173aabec334d5ba84","tarball":"http://registry-npm.ywwl.com/appdirsjs/download/appdirsjs-1.2.3.tgz","fileCount":3,"unpackedSize":6211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu/XHCRA9TVsSAnZWagAAZVEP/RjrYcmKJQN6DJ5boZ0p\nuxU49DMJxzOALnfGcMD/zxbM51JhNlo0FLw3cNcr7KWEtwz14+BO87cJP7R+\nllSWf4RRlvxhyKiJSrWKXd0WgmsMPLPGqpArzn4RDdWTe8R/XaR5QDqcYHyZ\nypRT//owYTgnI1qJb2zlUKIil7oWbmukg4Y8m05x7Xdwe8mIN7uZZzDsgpxQ\nXzZEMRg8Oi1yjvqdRcbwikxsnoKl0Qhx9oQZDIEfIN70C+yQqDAe6LewNGet\nWTShGZmPYhuQRw9kIPAeOjpRuWs3IlhtOQ08BqPWkSSaRLn16zm31AB4dYAy\nJZT1f11mhiu/SQPCzFd/wUxboTwTukL+ejaDntfPyXKY1waO8aqV1N4zVGWE\no2injzoou0Wvp7wXsoPuWPR3Zctb8Y0t6ZsWB114rF/oRosKzIBTg2woAuxY\nfta/0jW9H6aiyOnPW0w2R7EvWVFvZHs77AYA+gG8dvxew81IyTwFo1QxEooX\nhw9lxF97NfArb9Qc9r5GNidQShWv/liEYjkcP0IBqY99laDEuGkJ5oxHAvG+\nuq61PGhMT2fXE1kPHdQU3OAl1QeF7TF0tYRQAdLoZpMurW9MY+1KEAw8gxq5\nUDqvBh1GhO/11uSTzSaxM7Qbs3X6PrRTuHuxjap/pyQkrQZn0Zp0YEdp0LJ5\ntP9Y\r\n=6lQ3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLMbll5lSVdWrp7Zl4RCEQRNEiRa9VhzVr1Ot0L0MdIAiBlFlk8l7kUiJfkCU53sSwkz/lKe3ObgwAfrZXbWdZdqw=="}],"size":2241,"noattachment":false,"key":"/appdirsjs/-/appdirsjs-1.2.3.tgz"},"_npmUser":{"name":"codingjerk","email":"codingjerk@gmail.com"},"directories":{},"maintainers":[{"name":"codingjerk","email":"codingjerk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/appdirsjs_1.2.3_1606153671366_0.3335466449448874"},"_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":1606153671567,"_cnpm_publish_time":1606153671567,"dist-tags":{"latest":"1.2.8"}}