<commit_before>(function (env) {
    "use strict";
    env.ddg_spice_twitch_featured = function(api_result){

        if (!api_result || !api_result.featured || api_result.featured.length === 0 ||api_result.error) {
            return Spice.failed('twitch_featured');
        }
        
        Spice.add({
            minItemsForModeSwitch: 3,
            id: "twitch_featured",
            name: "Twitch Featured Streams",
            data: api_result.featured,
            meta: {
                sourceName: "twitch.tv",
                sourceUrl: "http://www.twitch.tv/",
                itemType: "Twitch Featured"
            },
            templates: {
                group: 'base',
                detail: false,
                item_detail: false,
                item: 'videos_item',
                moreAt: true,
            },
            normalize: function(featuredStream) {
                var title = "Untitled Broadcast";
                if(item.stream.channel.status != null) {
                    title = featuredStream.stream.channel.display_name + ": " + featuredStream.stream.channel.status;
                }
                
                return {
                    url: featuredStream.stream.channel.url,
                    viewCount: featuredStream.stream.viewers,
                    images: featuredStream.stream.preview,
                    title: title,
                    duration: featuredStream.stream.game
                };
            }
        });<commit_msg>Update twitch_featured.js<commit_after>(function (env) {
    "use strict";
    env.ddg_spice_twitch_featured = function(api_result){

        if (!api_result || !api_result.featured || api_result.featured.length === 0 ||api_result.error) {
            return Spice.failed('twitch_featured');
        }
        
        Spice.add({
            minItemsForModeSwitch: 3,
            id: "twitch_featured",
            name: "Twitch Featured Streams",
            data: api_result.featured,
            meta: {
                sourceName: "twitch.tv",
                sourceUrl: "http://www.twitch.tv/",
                itemType: "Twitch Featured"
            },
            templates: {
                group: 'base',
                detail: false,
                item_detail: false,
                item: 'videos_item',
                moreAt: true,
            },
            normalize: function(featuredStream) {
                var title = "Untitled Broadcast";
                if(featuredStream.stream.channel.status != null && featuredStream.stream.channel.display_name != null) {
                    title = featuredStream.stream.channel.display_name + ": " + featuredStream.stream.channel.status;
                }
                
                return {
                    url: featuredStream.stream.channel.url,
                    viewCount: featuredStream.stream.viewers,
                    images: featuredStream.stream.preview,
                    title: title,
                    duration: featuredStream.stream.game
                };
            }
        });
{'fraction_non_alphanumeric': 0.10051880674448768, 'fraction_numerical': 0.0012970168612191958, 'mean_word_length': 1.3585626911314985, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6532371', 'n_tokens_mistral': 817, 'n_tokens_neox': 770, 'n_words': 135}