UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

151 lines (150 loc) 6.03 kB
{ "_args": [ [ { "raw": "configstore@^3.0.0", "scope": null, "escapedName": "configstore", "name": "configstore", "rawSpec": "^3.0.0", "spec": ">=3.0.0 <4.0.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/update-notifier" ] ], "_from": "configstore@>=3.0.0 <4.0.0", "_id": "configstore@3.1.2", "_inCache": true, "_location": "/configstore", "_nodeVersion": "8.10.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/configstore_3.1.2_1522036601058_0.2787222913818217" }, "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "_npmVersion": "5.6.0", "_phantomChildren": {}, "_requested": { "raw": "configstore@^3.0.0", "scope": null, "escapedName": "configstore", "name": "configstore", "rawSpec": "^3.0.0", "spec": ">=3.0.0 <4.0.0", "type": "range" }, "_requiredBy": [ "/update-notifier" ], "_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", "_shasum": "c6f25defaeef26df12dd33414b001fe81a543f8f", "_shrinkwrap": null, "_spec": "configstore@^3.0.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/update-notifier", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/yeoman/configstore/issues" }, "dependencies": { "dot-prop": "^4.1.0", "graceful-fs": "^4.1.2", "make-dir": "^1.0.0", "unique-string": "^1.0.0", "write-file-atomic": "^2.0.0", "xdg-basedir": "^3.0.0" }, "description": "Easily load and save config without having to think about where and how", "devDependencies": { "ava": "*", "xo": "*" }, "directories": {}, "dist": { "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "shasum": "c6f25defaeef26df12dd33414b001fe81a543f8f", "tarball": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", "fileCount": 4, "unpackedSize": 6857 }, "engines": { "node": ">=4" }, "files": [ "index.js" ], "gitHead": "f09f067e50e6a636cfc648a6fc36a522062bd49d", "homepage": "https://github.com/yeoman/configstore#readme", "keywords": [ "config", "store", "storage", "conf", "configuration", "settings", "preferences", "json", "data", "persist", "persistent", "save" ], "license": "BSD-2-Clause", "maintainers": [ { "name": "addyosmani", "email": "addyosmani@gmail.com" }, { "name": "arthurvr", "email": "contact@arthurverschaeve.be" }, { "name": "eddiemonge", "email": "eddie+npm@eddiemonge.com" }, { "name": "hemanth", "email": "hemanth.hm@gmail.com" }, { "name": "mischah", "email": "mail@michael-kuehnel.de" }, { "name": "passy", "email": "phartig@rdrei.net" }, { "name": "sboudrias", "email": "admin@simonboudrias.com" }, { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, { "name": "zckrs", "email": "mdara@eleven-labs.com" } ], "name": "configstore", "optionalDependencies": {}, "readme": "# configstore [![Build Status](https://travis-ci.org/yeoman/configstore.svg?branch=master)](https://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 JSON file located in `$XDG_CONFIG_HOME` or `~/.config`.<br>\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\n\n## Usage\n\n```js\nconst Configstore = require('configstore');\nconst pkg = require('./package.json');\n\n// create a Configstore instance with an unique ID e.g.\n// Package name and optionally some default values\nconst conf = new Configstore(pkg.name, {foo: 'bar'});\n\nconsole.log(conf.get('foo'));\n//=> 'bar'\n\nconf.set('awesome', true);\nconsole.log(conf.get('awesome'));\n//=> true\n\n// Use dot-notation to access nested properties\nconf.set('bar.baz', true);\nconsole.log(conf.get('bar'));\n//=> {baz: true}\n\nconf.delete('awesome');\nconsole.log(conf.get('awesome'));\n//=> undefined\n```\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\n##### globalConfigPath\n\nType: `boolean`<br>\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### 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\nconf.all = {\n\thello: 'world'\n};\n```\n\n\n## License\n\n[BSD license](http://opensource.org/licenses/bsd-license.php)<br>\nCopyright Google\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/yeoman/configstore.git" }, "scripts": { "test": "xo && ava" }, "version": "3.1.2" }