{"name":"configstore","version":"5.0.1","description":"Easily load and save config without having to think about where and how","license":"BSD-2-Clause","repository":{"type":"git","url":"git+https://github.com/yeoman/configstore.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["config","store","storage","configuration","settings","preferences","json","data","persist","persistent","save"],"dependencies":{"dot-prop":"^5.2.0","graceful-fs":"^4.1.2","make-dir":"^3.0.0","unique-string":"^2.0.0","write-file-atomic":"^3.0.0","xdg-basedir":"^4.0.0"},"devDependencies":{"ava":"^2.1.0","xo":"^0.24.0"},"gitHead":"7892c8ae62c963934ed2a77b1dcfd0713c6bbf99","bugs":{"url":"https://github.com/yeoman/configstore/issues"},"homepage":"https://github.com/yeoman/configstore#readme","_id":"configstore@5.0.1","_nodeVersion":"10.18.1","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==","shasum":"d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96","tarball":"http://registry-npm.ywwl.com/configstore/download/configstore-5.0.1.tgz","fileCount":4,"unpackedSize":7614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRYrZCRA9TVsSAnZWagAAaQEP/Az/NTpLtgRmh7PjDtzx\nq/AHenICh9sQtxIJXGmBZo0vAd43ohgweoGCtuV3KavBzm8lihL9PtAlhofk\n/Yg59qxEgmjB53mS40OgdtMbcI5pdW8MJx13s7C1OIdT6S8AwOXzc8bFjCQt\n3yvPV9FRyXUcpDq8WNF6zD0jQM9+pKzKbp58NolQis8ocdzaJcBG+EJpG48x\nt7R6Blenh5kW3tjrfjsZzMsFyg565ylD5OBZ3OwEITW7PSuL0LUFfVFdzhKY\nKjvl4usMiWma3B6X9awZFAg/wcTgOOnSbOQRmoS0BdCeLWDD+MiEXVlmmVjY\npggN09+BilXDonrTMES95l/WIuz2sh95vu+AvbY887r4cV3rgj1zF0qUqp1h\nOsBUOvkvhCOKDdxjtvFLV4W+Fv1HUK+b8wUPphHrD0Z7kM02Fz4XE0npkdno\n5BEKIZro7Gerxfb4dRoQa5cdgU/b1dDbD+d9Cmp35vMhP7ASKECBdhZ8MSk4\nxcX0DYyNtHWJ217u9x45VxgbQB78uHeesX9MjNOKaRzTKk8W/ph6XLUluIg2\nObAJvnMWLaKUZ4DVFpvz00PBTcoe/qzqJiZXvtl/V/VBWMhcx0YM1erthETx\n9eTf+5oQAcQakoRnM2kDF2sdOloQ+VFCILTatYo44FSb8DCa2TQZ4jPVt4tJ\nV2WH\r\n=Tw1U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGA+FsTB/J6s4CIGJMm+ot0naKwFPC2TYly4fqGjPbiWAiEA6D07vBhAGLiVSQVZ2KOFMWPKnEwIcwCwsitoOl4bu/A="}],"size":3402,"noattachment":false,"key":"/configstore/-/configstore-5.0.1.tgz"},"maintainers":[{"email":"addyosmani@gmail.com","name":"addyosmani"},{"email":"eddie+npm@eddiemonge.com","name":"eddiemonge"},{"email":"mail@michael-kuehnel.de","name":"mischah"},{"email":"admin@simonboudrias.com","name":"sboudrias"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"},{"email":"ulisesgascondev@gmail.com","name":"ulisesgascon"},{"email":"mehdy.dara.fr@gmail.com","name":"zckrs"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/configstore_5.0.1_1581615832425_0.15766013962756342"},"_hasShrinkwrap":false,"readme":"# configstore\n\n> Easily load and persist config without having to think about where and how\n\nThe config is stored in a JSON file located in `$XDG_CONFIG_HOME` or `~/.config`.\\\nExample: `~/.config/configstore/some-id.json`\n\n*If you need this for Electron, check out [`electron-store`](https://github.com/sindresorhus/electron-store) instead.*\\\n*And check out [`conf`](https://github.com/sindresorhus/conf) for a more modern version of `configstore`.*\n\n## Install\n\n```\n$ npm install configstore\n```\n\n## Usage\n\n```js\nimport Configstore from 'configstore';\n\nconst packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));\n\n// Create a Configstore instance.\nconst config = new Configstore(packageJson.name, {foo: 'bar'});\n\nconsole.log(config.get('foo'));\n//=> 'bar'\n\nconfig.set('awesome', true);\nconsole.log(config.get('awesome'));\n//=> true\n\n// Use dot-notation to access nested properties.\nconfig.set('bar.baz', true);\nconsole.log(config.get('bar'));\n//=> {baz: true}\n\nconfig.delete('awesome');\nconsole.log(config.get('awesome'));\n//=> undefined\n```\n\n## API\n\n### Configstore(packageName, defaults?, options?)\n\nReturns a new instance.\n\n#### packageName\n\nType: `string`\n\nName of your package.\n\n#### defaults\n\nType: `object`\n\nDefault config.\n\n#### options\n\nType: `object`\n\n##### globalConfigPath\n\nType: `boolean`\\\nDefault: `false`\n\nStore the config at `$CONFIG/package-name/config.json` instead of the default `$CONFIG/configstore/package-name.json`. This is not recommended as you might end up conflicting with other tools, rendering the \"without having to think\" idea moot.\n\n##### configPath\n\nType: `string`\\\nDefault: Automatic\n\n**Please don't use this option unless absolutely necessary and you know what you're doing.**\n\nSet the path of the config file. Overrides the `packageName` and `globalConfigPath` options.\n\n### Instance\n\nYou can use [dot-notation](https://github.com/sindresorhus/dot-prop) in a `key` to access nested properties.\n\n### .set(key, value)\n\nSet an item.\n\n### .set(object)\n\nSet multiple items at once.\n\n### .get(key)\n\nGet an item.\n\n### .has(key)\n\nCheck if an item exists.\n\n### .delete(key)\n\nDelete an item.\n\n### .clear()\n\nDelete all items.\n\n### .size\n\nGet the item count.\n\n### .path\n\nGet the path to the config file. Can be used to show the user where the config file is located or even better open it for them.\n\n### .all\n\nGet all the config as an object or replace the current config with an object:\n\n```js\nconfig.all = {\n\thello: 'world'\n};\n```\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-configstore?utm_source=npm-configstore&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","publish_time":1581615832531,"_cnpm_publish_time":1581615832531,"dist-tags":{"latest":"8.0.0","legacy-v3":"3.1.5"}}