<commit_before>var fs = require('fs')
    json = require('./download/all.json'),

    URL_BASE = 'http://nodejs.org/api/all.html#all_',

    items = [];

function createItem(ops) {
    items.push([
        ops.name,
        'A',
        '','','','','','','','','',
        ops.abstract,
        URL_BASE + ops.URL
    ].join('\t'));
}

function getAbstract(obj) {
    var a = obj.desc || '',
        code = '',
        stability = '';

    if (obj.type && obj.type === 'method') {
        code = '<pre><code>' + obj.textRaw + '</code></pre>';
    }

    if (obj.stability) {
        stability = '<p>Stability: ' + obj.stability + ' - ' + obj.stabilityText + '</p>';
    }

    a = code + a + stability;

    // there's some non-utf8 stuff that postgres doesn't like:
    a = a.replace(/0x00|\\0|\\u0000/g,' ');
<commit_msg>#412 nodejs new Fathead Template Elements<commit_after>var fs = require('fs')
    json = require('./download/all.json'),

    URL_BASE = 'http://nodejs.org/api/all.html#all_',

    items = [];

function createItem(ops) {
    items.push([
        ops.name,
        'A',
        '','','','','','','','','',
        ops.abstract,
        URL_BASE + ops.URL
    ].join('\t'));
}

function getAbstract(obj) {
    var a = obj.desc ? '<p>' + obj.desc + '</p>' : '',
        code = '',
        stability = '';

    if (obj.type && obj.type === 'method') {
        code = '<pre><code>' + obj.textRaw + '</code></pre>';
    }

    if (obj.stability) {
        stability = '<p>Stability: ' + obj.stability + ' - ' + obj.stabilityText + '</p>';
    }

    a = '<section class="prog__container">' a + code + stability + '</section>';

    // there's some non-utf8 stuff that postgres doesn't like:
    a = a.replace(/0x00|\\0|\\u0000/g,' ');

{'fraction_non_alphanumeric': 0.22945205479452055, 'fraction_numerical': 0.011986301369863013, 'mean_word_length': 2.21651376146789, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5808131', 'n_tokens_mistral': 621, 'n_tokens_neox': 598, 'n_words': 117}