Noncollinear Perpendicular Microcrystalline
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    multilevel-inipublic

    README

    NPM

    Installation

    npm install multilevel-ini

    or in package.json

    ...
    "dependencies": {
        "multilevel-ini": "*",
    }
    ...

    API

    var ini = require('multilevel-ini');
    ini.get(filePath, callback);
    ini.getSync(filePath);
    ini.set(data, filePath, callback);
    ini.setSync(data, filePath);
    ini.objToIni(chunk, firstElementIsTitle, prefix);
    ini.iniToObj(str);

    Example

    var ini = require('multilevel-ini');
     
    ini.get('some.ini', function(error, result) {
        if (!error) {
            console.log('result', result);
        }
    });
     
    var obj = {
        'FirstZone': {
            'foo': 'any value',
            'bar': {
                'foo': [1,2,3,4,5]
            }
        },
        'SecondZone': {
            'foo': [
                'foo',
                'bar',
                'foo',
                'bar'
            ]
        }
    };
     
    ini.set(obj, 'some.ini', function(error, result) {
        if (error) {
            console.log(error);
            return;
        }
        console.log('save ok');
    });

    more in examples

    install

    npm i multilevel-ini

    Downloadslast 7 days

    28

    version

    1.1.2

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar