UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

104 lines (103 loc) 5.4 kB
{ "_args": [ [ { "raw": "ini@^1.3.4", "scope": null, "escapedName": "ini", "name": "ini", "rawSpec": "^1.3.4", "spec": ">=1.3.4 <2.0.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/config-chain" ] ], "_from": "ini@>=1.3.4 <2.0.0", "_id": "ini@1.3.5", "_inCache": true, "_location": "/ini", "_nodeVersion": "8.9.1", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/ini-1.3.5.tgz_1511302634290_0.6889052151236683" }, "_npmUser": { "name": "isaacs", "email": "i@izs.me" }, "_npmVersion": "5.5.1", "_phantomChildren": {}, "_requested": { "raw": "ini@^1.3.4", "scope": null, "escapedName": "ini", "name": "ini", "rawSpec": "^1.3.4", "spec": ">=1.3.4 <2.0.0", "type": "range" }, "_requiredBy": [ "/config-chain", "/global-dirs", "/rc", "/read-ini-file" ], "_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "_shasum": "eee25f56db1c9ec6085e0c22778083f596abf927", "_shrinkwrap": null, "_spec": "ini@^1.3.4", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/config-chain", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/ini/issues" }, "dependencies": {}, "description": "An ini encoder/decoder for node", "devDependencies": { "standard": "^10.0.3", "tap": "^10.7.3 || 11" }, "directories": {}, "dist": { "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "shasum": "eee25f56db1c9ec6085e0c22778083f596abf927", "tarball": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz" }, "engines": { "node": "*" }, "files": [ "ini.js" ], "gitHead": "738eca59d77d8cfdddf5c477c17a0d8f8fbfe0fd", "homepage": "https://github.com/isaacs/ini#readme", "license": "ISC", "main": "ini.js", "maintainers": [ { "name": "isaacs", "email": "i@izs.me" } ], "name": "ini", "optionalDependencies": {}, "readme": "An ini format parser and serializer for node.\n\nSections are treated as nested objects. Items before the first\nheading are saved on the object directly.\n\n## Usage\n\nConsider an ini-file `config.ini` that looks like this:\n\n ; this comment is being ignored\n scope = global\n\n [database]\n user = dbuser\n password = dbpassword\n database = use_this_database\n\n [paths.default]\n datadir = /var/lib/data\n array[] = first value\n array[] = second value\n array[] = third value\n\nYou can read, manipulate and write the ini-file like so:\n\n var fs = require('fs')\n , ini = require('ini')\n\n var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))\n\n config.scope = 'local'\n config.database.database = 'use_another_database'\n config.paths.default.tmpdir = '/tmp'\n delete config.paths.default.datadir\n config.paths.default.array.push('fourth value')\n\n fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))\n\nThis will result in a file called `config_modified.ini` being written\nto the filesystem with the following content:\n\n [section]\n scope=local\n [section.database]\n user=dbuser\n password=dbpassword\n database=use_another_database\n [section.paths.default]\n tmpdir=/tmp\n array[]=first value\n array[]=second value\n array[]=third value\n array[]=fourth value\n\n\n## API\n\n### decode(inistring)\n\nDecode the ini-style formatted `inistring` into a nested object.\n\n### parse(inistring)\n\nAlias for `decode(inistring)`\n\n### encode(object, [options])\n\nEncode the object `object` into an ini-style formatted string. If the\noptional parameter `section` is given, then all top-level properties\nof the object are put into this section and the `section`-string is\nprepended to all sub-sections, see the usage example above.\n\nThe `options` object may contain the following:\n\n* `section` A string which will be the first `section` in the encoded\n ini data. Defaults to none.\n* `whitespace` Boolean to specify whether to put whitespace around the\n `=` character. By default, whitespace is omitted, to be friendly to\n some persnickety old parsers that don't tolerate it well. But some\n find that it's more human-readable and pretty with the whitespace.\n\nFor backwards compatibility reasons, if a `string` options is passed\nin, then it is assumed to be the `section` value.\n\n### stringify(object, [options])\n\nAlias for `encode(object, [options])`\n\n### safe(val)\n\nEscapes the string `val` such that it is safe to be used as a key or\nvalue in an ini-file. Basically escapes quotes. For example\n\n ini.safe('\"unsafe string\"')\n\nwould result in\n\n \"\\\"unsafe string\\\"\"\n\n### unsafe(val)\n\nUnescapes the string `val`\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/isaacs/ini.git" }, "scripts": { "postpublish": "git push origin --all; git push origin --tags", "postversion": "npm publish", "pretest": "standard ini.js", "preversion": "npm test", "test": "tap test/*.js --100 -J" }, "version": "1.3.5" }