or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-2/

Configuration Normalizer

A utility that normalizes Apple plist configuration files by processing dictionaries with incomplete key-value pairs and generating standardized output.

Capabilities

Parse configuration files

  • Parse a valid plist XML string containing a dictionary with all key-value pairs present and return the JavaScript object @test
  • Parse a plist XML string containing a dictionary where a key has no corresponding value element and return an object with that key mapped to an empty string @test
  • Parse a plist XML string with multiple dictionaries, some with missing values, and correctly handle all missing values as empty strings @test

Generate normalized configuration

  • Build a plist XML string from a JavaScript object containing a dictionary with an undefined value and ensure the key exists in the output without a value element @test
  • Build a plist XML string from a JavaScript object with mixed undefined and defined values, ensuring all keys are present in output @test

Implementation

@generates

API

/**
 * Parses a plist configuration and returns a normalized JavaScript object
 * where missing dictionary values are handled appropriately.
 *
 * @param {string} plistXml - The plist XML string to parse
 * @returns {Object} The parsed JavaScript object
 */
function parseConfig(plistXml) {
  // IMPLEMENTATION HERE
}

/**
 * Builds a plist XML string from a configuration object,
 * handling undefined values appropriately.
 *
 * @param {Object} config - The configuration object to convert
 * @returns {string} The plist XML string
 */
function buildConfig(config) {
  // IMPLEMENTATION HERE
}

module.exports = {
  parseConfig,
  buildConfig,
};

Dependencies { .dependencies }

plist { .dependency }

Provides Apple plist parsing and building functionality with proper handling of dictionary key-value pairs.

@satisfied-by