{"name":"appdirsjs","version":"1.2.6","description":"OS-dependent application paths for cache, data and config directories","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/codingjerk/appdirsjs.git"},"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":"b27921e63a80472c0f65c40215965cafc36b307c","bugs":{"url":"https://github.com/codingjerk/appdirsjs/issues"},"homepage":"https://github.com/codingjerk/appdirsjs#readme","_id":"appdirsjs@1.2.6","_nodeVersion":"15.14.0","_npmVersion":"7.7.6","dist":{"integrity":"sha512-D8wJNkqMCeQs3kLasatELsddox/Xqkhp+J07iXGyL54fVN7oc+nmNfYzGuCs1IEP6uBw+TfpuO3JKwc+lECy4w==","shasum":"fccf9ee543315492867cacfcfd4a2b32257d30ac","tarball":"http://registry-npm.ywwl.com/appdirsjs/download/appdirsjs-1.2.6.tgz","fileCount":4,"unpackedSize":7429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2joACRA9TVsSAnZWagAAllEP/3UEAO2N5Lip7qFg/5Lv\n7uwFmPZABLxJLnHg2+91yFEqIFXH60/9EQq1zI9nDffrJrKOCIvrizc1hBGQ\n/OJvn6IxWflttQmbZgFBHZz89nC270PNHZ4ggP5LHahS/zv0DBK0EQ/N/YE7\nRk+TExa5KvPVAueoc5Cj2OU/bzy6rm0LvR60Gd57/APmQXoeUE1HKAR5LwwX\nW3wAGETmdU0T7O7+VcqdPlgkeGA6i66m1T1wXdlydEOJhHUL80XXlMjxyV3o\nDtAF6Z8mwcn3CcM3WVBg2mHVqHS7DbjsbhRCyRLg2wcEIkE92vrQN1urFZU2\nRMW8FVuKsqZ+eoFOMje9PvxwJVe59IAiQS9X62QATprc79QXenHnzVFY0ekp\nR4ny+dAN43YDp8b9e0QYApT6OT6y5KTUpxYTZRCzhAkkggVGJ3Li06+rwQfD\nIgrRciXMY8R5lbPq/lz72mtkWcE+kPP707OTNH0XnEjBJH2H78ruQBmTxwsx\nn8MlefmoJpjX0ad3UHfeXq/rg0uOjDFowQZf5V61QZ8v3QLWEgkclepbwfxK\nzRy0MPipNRLISriPM4LkzYpe3prBMZD5VbmTsFnECxnnDgC0tggH8IrgBdvv\nfUQHRA3mAjePQXiS+AFV7Q5gCcvE0E4N4q3O7H9oORttv1vMEv0fcGhf+hGQ\nOnAr\r\n=mste\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTaiwQWbbgeQTXHkOpWd5gcTQIcgzyUIOb+Fn7jH7E7AIgZDQ+sWgnjaPaL0B8j8PhSmPLTnEzRVqMsgHF10Ism6Y="}],"size":2388,"noattachment":false,"key":"/appdirsjs/-/appdirsjs-1.2.6.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.6_1634804077996_0.13205567679048413"},"_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":1634804078221,"_cnpm_publish_time":1634804078221,"dist-tags":{"latest":"1.2.8"}}