mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 23:55:20 +00:00
20 lines
406 B
JavaScript
20 lines
406 B
JavaScript
var Config = require('../models/config');
|
|
|
|
/**
|
|
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(config, values);
|
|
}
|
|
|
|
module.exports = decodeGlobal;
|