{"name":"appdirsjs","version":"1.0.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":"389be41a4d28c5dec66c7056461377df1cd5205c","bugs":{"url":"https://github.com/codingjerk/appdirsjs/issues"},"homepage":"https://github.com/codingjerk/appdirsjs#readme","_id":"appdirsjs@1.0.0","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-FRwghCxup8zFaLPBCxpR4q1hVod/SfTeKzIPvW0YpZveiUScsBJCbdthBz0IvGdMvnAoOi1Pm2V/5VjIyuIvAQ==","shasum":"1b5fdb0776bc49509ccd6e6abe5b04bdb0a43b8f","tarball":"http://registry-npm.ywwl.com/appdirsjs/download/appdirsjs-1.0.0.tgz","fileCount":14,"unpackedSize":11816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflHC7CRA9TVsSAnZWagAA3BMP/3LTeERRBpbUXSiPmyHW\nPFyzte0zmMqkG3D4Z6CGRnNc3Xrq0D0vDIy3WojrTCLAnuZbJIcF93WsWcL4\naLLi6Yn2ehFMvHBORQLXW5aSJE34Z9UKyBt399MhzCugh92CnGleYVE8BgXj\n6s9tC+G2hsQu4VX9S4V+ekLouR75u4Fx/JWtiRTX75dO2+E8yMLmb/3YMCoq\nCJqYz8hNUB2h5hz2WT0XYup6NUu/3WSxAyKmj+Hwf6K+QC81f3VJcUpnjzYf\nCh/Q38RHZblSqiT8lsJlRqeuQnkDeVX1QvoJV8wi6XMeoM+uwz+GOPM8YKk1\nc5RiBLVo4XQUusF9uS7kt5FRdDSnhpJkqtGYRM+t1GEcCl/mO4C9mTA8Q7TU\nnRRtMK/WCtJ1dkS1/xxNpFWDVigNGObiduz5ACQp7OaRvbm60wNMUeEd/uMw\n616rxHvZ70J1HJ+nVBWWwPbY4OcXsR9ur+gRspk1Lm0vo7QAPf30OlNhclch\nOSL+qy2KHFDT9n4dXL5EeL8KgriZRgKOPHHSejm85DcmE6Lko7Ld/IbF4sCo\nAQPElRuKc99T+JPdNGlurAnvdn6TR8Cfy4H/ae5p+CAE0Tc5bCMipE8+wsGO\nNPhFiMraZNx/RDCrTTaQ5Q47QeY/T8mVA+MBHJDqlI/eAwsH90c5EluDAiKh\nqnWc\r\n=1H3i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9odsJFcPbneij4b+m0JGYcX1PrfEiolAq2YxVVDXRzgIgS7tDzley1Dx3DycKRpshFoKdQTPExYoULhSscFxh9GE="}],"size":4396,"noattachment":false,"key":"/appdirsjs/-/appdirsjs-1.0.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.0.0_1603563706777_0.3675566665133543"},"_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":1603563706936,"_cnpm_publish_time":1603563706936,"dist-tags":{"latest":"1.2.8"}}