{"name":"multi-ini","version":"2.1.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":"1d32e9a7eacbb14bece31dc92817749770f59273","_id":"multi-ini@2.1.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","_npmUser":{"name":"mgeppert","email":"mi.iwersen@gmail.com"},"dist":{"integrity":"sha512-ANOg4WIoTXYfqyT2Y6FGb8YQyItatdJvfAZKAfFMWT1+D3vUstocjkUQ82EduAeK69rCR6a9k0fggxRhsFnAyQ==","shasum":"f093dbe074cef5bb2edd9db8f06946af459e6109","tarball":"http://registry-npm.ywwl.com/multi-ini/download/multi-ini-2.1.0.tgz","fileCount":40,"unpackedSize":82585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeUukgCRA9TVsSAnZWagAACNkP/09ERsMbSVlcF6pLhmkP\nuJbr95j6WWUYPc5Hd1aeFlLlQzXGdHb5SKiL5uiUQhnvEMbBaWIHjP3zPpAI\nXXvl3HDF2X5pTSZ//2qXxu9Za+NE3r0a3H4fLRRyR1e/JtCqSjrgUtQmOAr4\n9aANBkyJwn82by5swdeYJyDK6r5ui/qOXoyQPR8RsRQQ4iEMPpU0m7FIz0mY\nkdzjcFqbVEt4zNOo8pNfFTi0b8HCZoHbpWhYgBEjNzB6lYSgre35ewtY1OSQ\nGf8eYbYKOVgYj0p4gF4u8r6aYK1CVPZsrDMxavw3pq894WEqmByvIzxvmcV8\nXPRRfxKudTbtb/SQIWKayX9VKNEoZkMCaHRXoNxd7ShDRXE0CEz59rOpmNgJ\nwWmrYWtNPk5xXRgY7hn26XAdJr+Qu+9V8E5bhytIWR2ZWqmyFUPYLNXW3ru7\n15Yqogd1skNcpG24bOc/R8LrcjhpP9pCDnbvUha9eXtrB1kWd6J79PZQ5KGZ\ndVC4m5ybRMxmGLlleGVg6ut15KtPpCRwvNs68+AOKlKIdSgFVs+pvCOelUKo\nwTO9/RU5lthzar+CWsSPmqgmVTbsfsksnZ+bdmi09DUiZ0KQGyPhrpYCSavo\nuPxa+bKKIZo9xiXMnTn/NWMRc7eF1NH3vR0nX/tbTrkbZj69ElJfXv5fnf+C\n8hsI\r\n=sJNk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfcn1r4ZQhk/mvKIOCm0ybEaC+k/2enA5qTPfasBsEtwIhAPHqFR6JN4eWkHpHZIye6Gu12fmiivrKgCM8f90xDg7y"}],"size":13551,"noattachment":false,"key":"/multi-ini/-/multi-ini-2.1.0.tgz"},"maintainers":[{"name":"mgeppert","email":"evangelion1204@aol.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/multi-ini_2.1.0_1582491936354_0.20350531090793234"},"_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":1582491936462,"_cnpm_publish_time":1582491936462,"dist-tags":{"latest":"2.3.2"}}