<commit_before>"use strict";

// OPTIONS
var seeAll = false; // false=only errors and !=
var deepEqual = require('deep-equal');

// var yaml = require('./custom-yaml.js');

var JSON3 = require('json3');
var yaml = require('js-yaml');

var parte={
    parteA: "A",
}

var encoders=[
    {name: 'JSON3'     , object:JSON3, parseName:'parse'   , stringifyName:'stringify'},
    {name: 'JSON'      , object:JSON , parseName:'parse'   , stringifyName:'stringify'},
    {name: 'yaml'      , object:yaml , parseName:'load'    , stringifyName:'dump'     },
    {name: 'yaml-safe' , object:yaml , parseName:'safeLoad', stringifyName:'safeDump' },
]

var fixtures=[
    {name:'fecha'     ,value: new Date(1969, 5-1, 6),    },
    {name:'bigNumber' ,value: 12345678901234567890,      },
    {name:'strDate'   ,value: "2012-01-02",              },
    {name:'strStr'    ,value: "hola",                    },
    {name:'parte'     ,value: parte,                     },
    {name:'partes'    ,value: [parte, parte],            },
    {name:'rombo'     ,value: {a:parte, b:parte},        },
    {name:'array'     ,value: [1,"2", false],            },
    {name:'bool'      ,value: true,                      },
    {name:'null'      ,value: null,                      },
    {name:'undef'     ,value: undefined,                 },
    {name:'regex'     ,value: /hola/,                    },
    {name:'fun'       ,value: function(x){ return x+1; } },
];

encoders.forEach(function(encoderDef){
    if(encoderDef.skip) return;
    console.log('=======',encoderDef.name);
    fixtures.forEach(function(fixture){
        var withError=false;
        var dif=false;
        if(fixture.skip) return;
        var results=[];
        results.push(['----',fixture.name]);
        results.push(['value:',fixture.value]);<commit_msg>Agrego custom-yaml las prueba con encoders.<commit_after>"use strict";

// OPTIONS
var seeAll = false; // false=only errors and !=
var deepEqual = require('deep-equal');

// var yaml = require('./custom-yaml.js');

var JSON3 = require('json3');
var yaml = require('js-yaml');

var cYaml = require('../yaml/custom-yaml.js');

var parte={
    parteA: "A",
}

var encoders=[
    {name: 'JSON3'      , object:JSON3, parseName:'parse'     , stringifyName:'stringify' },
    {name: 'JSON'       , object:JSON , parseName:'parse'     , stringifyName:'stringify' },
    {name: 'yaml'       , object:yaml , parseName:'load'      , stringifyName:'dump'      },
    {name: 'yaml-safe'  , object:yaml , parseName:'safeLoad'  , stringifyName:'safeDump'  },
    {name: 'yaml-custom', object:cYaml, parseName:'customLoad', stringifyName:'customDump'},
]

var fixtures=[
    {name:'fecha'     ,value: new Date(1969, 5-1, 6),    },
    {name:'bigNumber' ,value: 12345678901234567890,      },
    {name:'strDate'   ,value: "2012-01-02",              },
    {name:'strStr'    ,value: "hola",                    },
    {name:'parte'     ,value: parte,                     },
    {name:'partes'    ,value: [parte, parte],            },
    {name:'rombo'     ,value: {a:parte, b:parte},        },
    {name:'array'     ,value: [1,"2", false],            },
    {name:'bool'      ,value: true,                      },
    {name:'null'      ,value: null,                      },
    {name:'undef'     ,value: undefined,                 },
    {name:'regex'     ,value: /hola/,                    },
    {name:'fun'       ,value: function(x){ return x+1; } },
];

encoders.forEach(function(encoderDef){
    if(encoderDef.skip) return;
    console.log('=======',encoderDef.name);
    fixtures.forEach(function(fixture){
        var withError=false;
        var dif=false;
        if(fixture.skip) return;
        var results=[];
        results.push(['----',fixture.name]);
        results.push(['value:',fixture.value]);
{'fraction_non_alphanumeric': 0.18748356560610044, 'fraction_numerical': 0.02208782540099921, 'mean_word_length': 2.2764857881136953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6301064', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1229, 'n_words': 234}