Ajnasz/IniReader — pull request #5 by udondan (2014-04-08 11:58:12+00:00)
Title: Add option to set params as array

I stumbled over a problem with this module. The block names in my ini file can contain dots. That's valid format.

```
[monitor:///path/to/my/logfile.log]
sourcetype=s1
disabled=false

[monitor:///path/to/other/logfile.log]
sourcetype=s2
disabled=false
```

Reading an ini file like this is no problem. But writing it the same way is not possible, as the dot will be used as a separator. The module would create a nested object:
```
{
'monitor:///path/to/logfile': { log: {
sourcetype: 's1',
disabled: false
}},
...
}
```
And then later throwing an error when trying to write to disk:
```
/path/to/node_modules/inireader/lib/inireadercore.js:462
if (value.indexOf('"') > -1) {
```
because `value` is no string but an object.

Using the dot as a separator makes it impossible to set both, a block or a key with dots, which both is valid.

I added a new feature in my fork. You can pass an array instead of a string.
```
parser.param(['block.name.with.dot', 'key.with.dot'], 'value.with.dots');
```
will generate:
```
[block.name.with.dot]
key.with.dots=value.with.dots
```