<commit_before>// http://jsont.squarespace.com/
// http://developers.squarespace.com/json-formatters/
var jsonTemplate = require( "./jsontemplate" ),
    slug = require( "slug" ),
    moment = require( "moment" ),
    phpjs = require( "phpjs" ),
    jsontFormatters = [
        "html",
        "htmltag",
        "html-attr-value",
        "str",
        "raw",
        "AbsUrl",
        "plain-url"
    ],
    sqsFormatters = {
        "date": function ( arg, ctx ) {
            return moment( arg ).format( "dddd, MMMM Do YYYY" );
        },
        "timesince": function ( arg, ctx ) {
            return moment( arg ).fromNow();
        },
        "item-classes": function ( arg, ctx ) {
            return "";
        },
        "social-button": function ( arg, ctx ) {
            return "";
        },
        "comments": function ( arg, ctx ) {
            return "";
        },
        "comment-link": function ( arg, ctx ) {
            return "";
        },
        "comment-count": function ( arg, ctx ) {
            return "";
        },
        "like-button": function ( arg, ctx ) {
            return "";
        },
        "image-meta": function ( arg, ctx ) {
            return "";
        },
        "product-price": function ( arg, ctx ) {
            return "";
        },
        "product-status": function ( arg, ctx ) {
            return "";
        },
        "json": function ( arg, ctx ) {
            return JSON.parse( arg );
        },
        "json-pretty": function ( arg, ctx ) {
            return JSON.stringify( arg, null, 4 );
        },
        "slugify": function ( arg, ctx ) {
            return slug( arg.toLowerCase() );
        },
        "url-encode": function ( arg, ctx ) {
            return encodeURI( encodeURIComponent( arg ) );
        },
        //"html",
        "htmlattr": function ( arg, ctx ) {
            return jsonTemplate.HtmlTagEscape( arg );
        },
        "htmltag": function ( arg, ctx ) {
            return jsonTemplate.HtmlTagEscape( arg );
        },
        "activate-twitter-links": function ( arg, ctx ) {
            return "";
        },
        "safe": function ( arg, ctx ) {
            return phpjs.strip_tags( arg );
        }
    };

module.exports = function ( formatter ) {<commit_msg>Supporting formatter: activate-twitter-links<commit_after>// http://jsont.squarespace.com/
// http://developers.squarespace.com/json-formatters/
var jsonTemplate = require( "./jsontemplate" ),
    slug = require( "slug" ),
    moment = require( "moment" ),
    phpjs = require( "phpjs" ),
    jsontFormatters = [
        "html",
        "htmltag",
        "html-attr-value",
        "str",
        "raw",
        "AbsUrl",
        "plain-url"
    ],
    sqsFormatters = {
        "date": function ( arg, ctx ) {
            return moment( arg ).format( "dddd, MMMM Do YYYY" );
        },
        "timesince": function ( arg, ctx ) {
            return moment( arg ).fromNow();
        },
        "item-classes": function ( arg, ctx ) {
            return "";
        },
        "social-button": function ( arg, ctx ) {
            return "";
        },
        "comments": function ( arg, ctx ) {
            return "";
        },
        "comment-link": function ( arg, ctx ) {
            return "";
        },
        "comment-count": function ( arg, ctx ) {
            return "";
        },
        "like-button": function ( arg, ctx ) {
            return "";
        },
        "image-meta": function ( arg, ctx ) {
            return "";
        },
        "product-price": function ( arg, ctx ) {
            return "";
        },
        "product-status": function ( arg, ctx ) {
            return "";
        },
        "json": function ( arg, ctx ) {
            return JSON.parse( arg );
        },
        "json-pretty": function ( arg, ctx ) {
            return JSON.stringify( arg, null, 4 );
        },
        "slugify": function ( arg, ctx ) {
            return slug( arg.toLowerCase() );
        },
        "url-encode": function ( arg, ctx ) {
            return encodeURI( encodeURIComponent( arg ) );
        },
        //"html",
        "htmlattr": function ( arg, ctx ) {
            return jsonTemplate.HtmlTagEscape( arg );
        },
        "htmltag": function ( arg, ctx ) {
            return jsonTemplate.HtmlTagEscape( arg );
        },
        "activate-twitter-links": function ( arg, ctx ) {
            return arg.replace( /(^|\s)@(\w+)/g, "$1<a href=\"http://twitter.com/$2\" target=\"_blank\">@$2</a>" );
        },
        "safe": function ( arg, ctx ) {
            return phpjs.strip_tags( arg );
        }
    };

module.exports = function ( formatter ) {
{'fraction_non_alphanumeric': 0.1579734929457033, 'fraction_numerical': 0.0010688328345446773, 'mean_word_length': 1.4756613756613757, 'pattern_counts': {'":': 38, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7415318', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1339, 'n_words': 309}