{"name":"multi-ini","version":"2.0.0","license":"MIT","description":"An ini-file parser which supports multi line, multiple levels and arrays to get a maximum of compatibility with Zend config files.","main":"lib/index.js","scripts":{"predistribute":"babel src --out-dir lib","test":"babel-node ./node_modules/.bin/_mocha","coverage":"babel-node ./node_modules/.bin/istanbul cover _mocha","distribute":"npm publish"},"homepage":"https://github.com/evangelion1204/multi-ini","author":{"name":"Michael Iwersen","email":"mi.iwersen@gmail.com"},"repository":{"type":"git","url":"git://github.com/evangelion1204/multi-ini.git"},"bugs":{"url":"https://github.com/evangelion1204/multi-ini/issues"},"licenses":[{"type":"MIT","url":"https://github.com/evangelion1204/multi-ini/blob/master/LICENSE"}],"keywords":["ini","zend","config","multi-line","multi-level"],"devDependencies":{"babel-cli":"^6.3.17","babel-plugin-check-es2015-constants":"^6.3.13","babel-plugin-transform-es2015-arrow-functions":"^6.4.0","babel-plugin-transform-es2015-block-scoping":"^6.3.13","babel-plugin-transform-es2015-classes":"^6.3.15","babel-plugin-transform-es2015-destructuring":"^6.18.0","babel-plugin-transform-es2015-for-of":"^6.18.0","babel-plugin-transform-es2015-modules-commonjs":"^6.3.16","babel-plugin-transform-es2015-parameters":"^6.3.26","babel-plugin-transform-es2015-shorthand-properties":"^6.18.0","babel-plugin-transform-es2015-template-literals":"^6.3.13","babel-plugin-transform-object-assign":"^6.8.0","babel-plugin-transform-object-rest-spread":"^6.19.0","babel-register":"^6.18.0","benchmark":"^2.0.0","chai":"^3.4.1","istanbul":"^1.1.0-alpha.1","mocha":"^5.2.0","sinon":"^1.17.2","sinon-chai":"^2.8.0"},"dependencies":{"lodash":"^4.0.0"},"gitHead":"31b42d3e36b344ad70da5eee9155eed24ca55ea8","_id":"multi-ini@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"mgeppert","email":"mi.iwersen@gmail.com"},"dist":{"integrity":"sha512-1f8ARxyQesSeRrBNRC0lwD5nDa9cJj/TI0t7vamGrpVRKAlWhM+4gTJbreFJge+rJ27f7zMbahDoND16cYmOzg==","shasum":"a82d912c7695d2dbabaf798fade81174430b933f","tarball":"http://registry-npm.ywwl.com/multi-ini/download/multi-ini-2.0.0.tgz","fileCount":39,"unpackedSize":79299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHESfCRA9TVsSAnZWagAADBYP/1wZ96KDm7in5Tm1otJl\njA6CVnxYYGgSTRt8k6SI2ROu+PQCL9n3tEkkXaLDSj20XqEfUotTjs5XSpXR\n7ZMIC2cC0S7b/HBdo8mEAIf9B1vaecuQoqjjLS1is4HDp36p6hwH07ffyqWB\n8jRPlT4QgeTr91w5BUiqgiHxGaQH34GjZPykYNrDasqNP4LcnOv74LMBWr2f\njXipdAqI3bAkML+jd3H0wHp4axWV3OspkyhSaT4c/PskMNDoLmuO4nIxUuk/\nmDtEKqczXRsE2kLZS7fdlh5441btb6NDOKKMv6d1q7L83YLzOqe59Q9CUZt+\n3X2y+ybb88X6S05QJhVe3TPymk6iyprwqd5KGN7brJ/gmfz33yy0iTklXOId\nOqhaXONu7Bke+67DrpKnAvCogfxp/7jG4FdAGK9WIDB3zBr27G+GXpbDlmm+\n2DqkBAtjuiOE8S4YizBmIVBlOodogfsaXfj+A8W770TYXhgAw2ofv8/G20Kc\nafWzyMw32F/3MPHbvw+Kl0Ybcx0JoCj5c9ghv8h6+6I/qzrOi5Wotq6WKxXX\nqgaF4qb9FLejWMagggoD0cfVdlsoC6bRAjvEeAGOIUSquub1klSvpwoSSSsu\nxcwTxC0uISG1Y0gGWt0JNbRZPabWdCuCWKKKYFMwRM61NtUTuRQ+zpWU+E3k\nijvm\r\n=8xd/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDl+8RFORGPwGI+pje/PNvGC6p0vWWW6vtF9Ab3DQq0kAiEAqnAqWwhKjktdsIiow74jcvGZlJQ3fFOU+MSdFXDq+Ws="}],"size":12932,"noattachment":false,"key":"/multi-ini/-/multi-ini-2.0.0.tgz"},"maintainers":[{"name":"mgeppert","email":"evangelion1204@aol.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/multi-ini_2.0.0_1528579230210_0.5532673987553738"},"_hasShrinkwrap":false,"readme":"# multi-ini [![Build Status](https://travis-ci.org/evangelion1204/multi-ini.png?branch=master)](https://travis-ci.org/evangelion1204/multi-ini) [![Coverage Status](https://coveralls.io/repos/evangelion1204/multi-ini/badge.svg?branch=master)](https://coveralls.io/r/evangelion1204/multi-ini?branch=master)\n\n[![Join the chat at https://gitter.im/evangelion1204/multi-ini](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/evangelion1204/multi-ini?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nAn ini-file parser which supports multi line, multiple levels and arrays to get a maximum of compatibility with Zend config files.\n\n## Install\n\n```shell\nnpm install multi-ini\n```\n\n## Usage\n\n```js\nini = require('multi-ini');\ncontent = ini.read(file);\ncontent.section.key = value;\nini.write(file, content);\n```\n\n## Options\n\nFollowing options are available:\n\n-   encoding \\[_'utf8'_\\] - directly passed to readFileSync\n-   keep_quotes \\[_false_\\] - does not strip quotes around values\n-   filters - predefined _lowercase_, _uppercase_, _trim_, _constants_, _boolean_, _integer_\n-   nested_section_names \\[_false_\\] - support to parse section names e.g. `[section.subsection]`\n-   keep_zero_prefix \\[_false_\\] - controls the integer parsing by ignoring numbers with leading 0\n\n### Examples\n\n#### encoding\n\n```js\nini = require('multi-ini');\ncontent = ini.read(file, { encoding: 'utf8' });\ncontent.section.key = value;\nini.write(file, content, { encoding: 'utf8' });\n```\n\n#### keep_quotes\n\nThis option is by default off to be backward compatible, if you ever need the value containing the quotes then use this.\n\n```ini\nkey=\"value\"\n```\n\nEnabling this option will result in **\"value\"** instead of **value**.\n\n```js\nini = require('multi-ini');\ncontent = ini.read(file, { keep_quotes: true });\n```\n\nThis will also affect the Serializer and serialized values. Using it will not quote anything automatically.\n\n```js\n{\n    production: {\n        quoted: '\"quoted\"',\n        not_quoted: 'not_quoted'\n    }\n}\n```\n\nWill result in a ini like\n\n```ini\n[production]\nquoted=\"quoted\"\nnot_quotes=not_quoted\n```\n\n#### filters\n\n```js\nMultiIni = require('multi-ini');\nini = new MultiIni.Class({\n    filters: [MultiIni.filters.lowercase],\n});\ncontent = ini.read(file);\n```\n\n_Replacing constants_\n\n```js\nMultiIni = require('multi-ini');\nini = new MultiIni.Class({\n    constants: { CONSTANT: 'replacement' },\n    filters: [MultiIni.filters.constants],\n});\ncontent = ini.read(file);\n```\n\n_Define a custom filter_\n\n```js\nMultiIni = require('multi-ini');\nini = new MultiIni.Class({\n    filters: [\n        function (value) {\n            return 'Prepend ' + value;\n        },\n    ],\n});\ncontent = ini.read(file);\n```\n\n#### line_breaks\n\nEither `unix` or `windows` for line breaks.\n\n```js\nini = require('multi-ini');\ncontent = ini.read(file, { line_breaks: 'windows' });\ncontent.section.key = value;\n```\n\n#### nested_section_names\n\nUsing `nested_section_names` will parse nested section names having a `.`.\n\n```js\nini = require('multi-ini');\ncontent = ini.read(file, { nested_section_names: true });\n```\n\n```ini\n[section.subsection]\nkey=\"value\"\n```\n\nWill result in\n\n```json\n{\n    \"section\": {\n        \"subsection\": {\n            \"key\": \"value\"\n        }\n    }\n}\n```\n\n#### Parser\n\nIt's also possible to parse a ini file from an array of strings.\n\n```js\nini = require('multi-ini');\nparser = new ini.Parser();\ncontent = parser.parse(lines);\n```\n\n#### Serializer\n\nLike parsing it's also possible to serialize an ini object to a string.\n\n```js\nini = require('multi-ini');\nserializer = new ini.Serializer();\ncontent = serializer.serialize({\n    production: {\n        base_url: 'https://google.com',\n    },\n});\n```\n\n## Changelog\n\n### 2.2.0\n\n-   Support for nested section names\n-   filter for integer parsing\n\n### 2.1.2\n\n-   Fixed prototype pollution by ignoring `constructor` and `prototype`\n\n### 2.1.1\n\n-   Fixed prototype pollution by ignoring `__proto__`\n\n### 1.0.1\n\n-   Fixed bug with `keep_quotes` ignored when writing files\n\n### 1.0.0\n\n-   First full release keeping backwards compatibility\n\n### 0.5.2\n\n-   Introduced option for line breaks\n\n### 0.5.1\n\n-   Fixed a bug where single lines of multilines got trimmed\n\n### 0.5.0\n\n-   Added support for filters per value\n\n### 0.4.0\n\n-   Refactoring of the basic implementation to be no longer a singleton\n-   Fixed a bug with wrong detected escaped double quotes\n\n### 0.2.5\n\nNow correctly reads\n\n```ini\nkey= example\n```\n\nto the value \"**example**\" instead of \"** example**\"\n\n### 0.2.4\n\nImplemented support for constants and removed a lot of bugs and the options **ignore_invalid** and **oninvalid**, this may be introduced again but are currently not necessary.\n\n### 0.2.3\n\nFixed a bug that the module was not recognized as a module by Node.\n","publish_time":1528579230351,"_cnpm_publish_time":1528579230351,"dist-tags":{"latest":"2.3.2"}}