docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a configuration converter that reads Apple property list XML files containing numeric settings and converts them to JavaScript objects, then modifies specific numeric values and writes them back to property list format.
Your implementation should:
/**
* Converts a plist XML string to a JavaScript object.
*
* @param {string} xmlString - The plist XML string to parse
* @returns {Object} The parsed JavaScript object
*/
function parsePlistConfig(xmlString) {
// IMPLEMENTATION HERE
}
/**
* Updates numeric settings in a configuration object.
* Multiplies all numeric values by a scale factor.
*
* @param {Object} config - The configuration object
* @param {number} scaleFactor - The scale factor to apply
* @returns {Object} A new object with scaled numeric values
*/
function scaleNumericSettings(config, scaleFactor) {
// IMPLEMENTATION HERE
}
/**
* Converts a JavaScript object back to plist XML format.
*
* @param {Object} obj - The JavaScript object to convert
* @returns {string} The plist XML string
*/
function buildPlistConfig(obj) {
// IMPLEMENTATION HERE
}
module.exports = {
parsePlistConfig,
scaleNumericSettings,
buildPlistConfig
};Provides property list parsing and building support.