spec/cordova/fixtures/projects/platformApi/platforms/windows/cordova/lib/ConfigChanges.js
function generateUapCapabilities(capabilities) {

    function hasCapabilityChange(change) {
        return /^\s*<(\w+:)?(Device)?Capability\s/.test(change.xml);
    }

    function createPrefixedCapabilityChange(change) {
        if (CapsNeedUapPrefix.indexOf(getCapabilityName(change)) < 0) {
            return change;
        }

        //  If capability is already prefixed, avoid adding another prefix
        var replaceXML = change.xml.indexOf('uap:') > 0 ? change.xml : change.xml.replace(/Capability/, 'uap:Capability');
        return {
            xml: replaceXML,
            count: change.count,
            before: change.before
        };
    }

    return capabilities
     // For every xml change check if it adds a <Capability> element ...
    .filter(hasCapabilityChange)
    // ... and create a duplicate with 'uap:' prefix
    .map(createPrefixedCapabilityChange);

}
function generateUapCapabilities(capabilities) {

    function hasCapabilityChange(change) {
        return /^\s*<(\w+:)?(Device)?Capability\s/.test(change.xml);
    }

    function createPrefixedCapabilityChange(change) {
        if (CapsNeedUapPrefix.indexOf(getCapabilityName(change)) < 0) {
            return change;
        }

        //  If capability is already prefixed, avoid adding another prefix
        var replaceXML = change.xml.indexOf('uap:') > 0 ? change.xml : change.xml.replace(/Capability/, 'uap:Capability');
        return {
            xml: replaceXML,
            count: change.count,
            before: change.before
        };
    }

    return capabilities
     // For every xml change check if it adds a <Capability> element ...
    .filter(hasCapabilityChange)
    // ... and create a duplicate with 'uap:' prefix
    .map(createPrefixedCapabilityChange);

}
Generates a new munge that contains <uap:Capability> elements created based on
corresponding <Capability> elements from base munge. If there are no such elements
found in base munge, the empty munge is returned (selectors might be present under
the 'parents' key, but they will contain no changes).

@param {Object} capabilities A list of capabilities
@return {Object} A list with 'uap'-prefixed capabilities