nl_tokens: 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 ) .
pl_tokens: 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 , <mask> : 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 ) ; }