bower
Version:
The browser package manager
58 lines (57 loc) • 2.8 kB
JSON
{
"name": "configstore",
"version": "0.3.2",
"description": "Easily load and save config without having to think about where and how",
"keywords": [
"conf",
"config",
"configuration",
"settings",
"store",
"editable",
"yaml",
"yml"
],
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yeoman/configstore.git"
},
"scripts": {
"test": "mocha"
},
"engines": {
"node": ">=0.10.0"
},
"license": "BSD",
"dependencies": {
"graceful-fs": "^3.0.1",
"js-yaml": "^3.1.0",
"mkdirp": "^0.5.0",
"object-assign": "^2.0.0",
"osenv": "^0.1.0",
"user-home": "^1.0.0",
"uuid": "^2.0.1",
"xdg-basedir": "^1.0.0"
},
"devDependencies": {
"mocha": "*"
},
"files": [
"index.js"
],
"readme": "# configstore [](http://travis-ci.org/yeoman/configstore)\n\n> Easily load and persist config without having to think about where and how.\n\nConfig is stored in a YAML file to make it simple for users to edit the config directly themselves. The file is located in `$XDG_CONFIG_HOME` or `~/.config`. Eg: `~/.config/configstore/id-of-your-choosing.yml`\n\n\n## Usage\n\n```js\nvar Configstore = require('configstore');\nvar packageName = require('./package').name;\n\n// Init a Configstore instance with an unique ID eg. package name\n// and optionally some default values\nvar conf = new Configstore(packageName, { foo: 'bar' });\n\nconf.set('awesome', true);\nconsole.log(conf.get('awesome')); // true\nconsole.log(conf.get('foo')); // bar\n\nconf.del('awesome');\nconsole.log(conf.get('awesome')); // undefined\n```\n\n\n## Documentation\n\n### Methods\n\n#### .set(key, val)\n\nSet an item\n\n#### .get(key)\n\nGet an item\n\n#### .del(key)\n\nDelete an item\n\n### Properties\n\n#### .all\n\nGet all items as an object or replace the current config with an object:\n\n```js\nconf.all = {\n\thello: 'world'\n};\n```\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\n## License\n\n[BSD license](http://opensource.org/licenses/bsd-license.php) \nCopyright Google\n",
"readmeFilename": "readme.md",
"bugs": {
"url": "https://github.com/yeoman/configstore/issues"
},
"homepage": "https://github.com/yeoman/configstore#readme",
"_id": "configstore@0.3.2",
"_shasum": "25e4c16c3768abf75c5a65bc61761f495055b459",
"_resolved": "https://registry.npmjs.org/configstore/-/configstore-0.3.2.tgz",
"_from": "configstore@>=0.3.2 <0.4.0"
}