summaryrefslogtreecommitdiffstats
path: root/lib/api/decodeConfig.js
blob: 5e00df584500e3b03e60470d727aa1b00fda2f94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
    Decode changes from a JS API to a config object

    @param {Config} config
    @param {Object} result: result from API
    @return {Config}
*/
function decodeGlobal(config, result) {
    var values = result.values;

    delete values.generator;
    delete values.output;

    return config.updateValues(values);
}

module.exports = decodeGlobal;