{"name":"appdirsjs","version":"1.2.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":"54acb0ce6b567657a0580ad3cb543120086b80ee","bugs":{"url":"https://github.com/codingjerk/appdirsjs/issues"},"homepage":"https://github.com/codingjerk/appdirsjs#readme","_id":"appdirsjs@1.2.0","_nodeVersion":"15.0.1","_npmVersion":"7.0.3","dist":{"integrity":"sha512-NG2hXimy6aGbR07TybjU+Bu0wsWSxl5UUzJ4oN4zjpXoL0hnUUxyl/SQKh1SL1BFDjvvkv/6O/cDM+ll1nl9pA==","shasum":"cf24f2fc12bf3b59e8096d8bb29adbf7f7759d68","tarball":"http://registry-npm.ywwl.com/appdirsjs/download/appdirsjs-1.2.0.tgz","fileCount":18,"unpackedSize":16702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnfM5CRA9TVsSAnZWagAACxQQAJfq0IqrgLlhFalZxMJJ\nAuBM+sdQUQNEwj3NScDSVJBSD7u/KNbMRTVDz9EtgueC90qyeKKpuJm0ZJD1\nXBstVnMmip/TUSyyiHuWIh/JeNXG+bT6u4uie9nJtgB5lCj32psj3Q/td1KH\nmYI/7otmWs3NUgcmYdyhFau1ZLN9KlWVEhPkBtntJ2Xix62Um4+YYNb5+2bP\noJwTDe4sYdb7inT0tgaOysjozam794UcGWAuwfdKRJ1UYs0rd7Xsf87UrZqy\nKXgR3gIBpveC9Xu8Z6qYRGNUbxUV4z0W+rzhZ7ulCNtz7s4iE77pboaBJ+So\ncaC09uFdUnS1iR1ckoWj5fAZt9+mZNiWrSUhFwISTvRTqNS+xT7Vt6PYiViU\nMMEItHRhzmk+jAoWZlNBrt1N1L0o8rQT2HSRW5G3PyEWzV1dSJC+XW3oqneX\npIBPnwzYHHf1ZyC+n+/7W7y9S4MTIGFvTxEr4f1XEKpe9MvRw2lDy8ASPDNZ\nbJmMIGYW+42IoRkjqPWJwhJQxkm3xVGrdP7h2LXRpAtaHEXh0BR36eajvVkS\nqwJFa+0Ka3DV23ba+B5KRIqPZQjM2Oa6/tN9Gemg3QEDV4jCtF0/cG7g0UhJ\naVpFvep6iHGQZayB/rsNE6xsH8GmJnE/ATu8wBtWMMvWuNXeehvfNChmWSXK\nhjEl\r\n=oxyU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB15c/JRVF35RJuHuWc5ZYLVL8ZqSIyxmbuWwDk9GRHUAiBiW3s4otWcj7lb5euE4ZmJ6GodPB7u4erLRc5yIWftBA=="}],"size":5040,"noattachment":false,"key":"/appdirsjs/-/appdirsjs-1.2.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.2.0_1604186937253_0.09756155588643334"},"_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":1604186937364,"_cnpm_publish_time":1604186937364,"dist-tags":{"latest":"1.2.8"}}