<commit_before>/**
 * jsacx.js
 * @author the regents of aconex ui
 */

( function() {

var window = this,
    $ = jQuery,
    acx = {};

/**
 * global acx namespace
 * @namespace
 * @name acx
 */
window.acx = acx;

/**
 * generic object iterator
 * @function
 */
acx.each = $.each;

/**
 * extends the first argument with the properties of the second and subsequent arguments
 * @function
 */
acx.extend = $.extend;

/**
 * augments the first argument with the properties of the second and subsequent arguments
 * like {@link acx.extend} except that existing properties are not overwritten
 */
acx.augment = function() {
    var args = Array.prototype.slice.call(arguments),
        src = (args.length === 1) ? this : args.shift(),
        augf = function(n, v) {
            if(! (n in src)) {
                src[n] = v;
            }
        };
    for(var i = 0; i < args.length; i++) {
        acx.each(args[i], augf);
    }
    return src;<commit_msg>add eachMap for generating arrays from objects<commit_after>/**
 * jsacx.js
 * @author the regents of aconex ui
 */

( function() {

var window = this,
    $ = jQuery,
    acx = {};

/**
 * global acx namespace
 * @namespace
 * @name acx
 */
window.acx = acx;

/**
 * generic object iterator
 * @function
 */
acx.each = $.each;

/**
 * object iterator, returns an array with one element for each property of the object
 * @function
 */
acx.eachMap = function(obj, fn, thisp) {
	var ret = [];
	for(var n in obj) {
		ret.push(fn.call(thisp, n, obj[n], obj));
	}
	return ret;
};

/**
 * extends the first argument with the properties of the second and subsequent arguments
 * @function
 */
acx.extend = $.extend;

/**
 * augments the first argument with the properties of the second and subsequent arguments
 * like {@link acx.extend} except that existing properties are not overwritten
 */
acx.augment = function() {
    var args = Array.prototype.slice.call(arguments),
        src = (args.length === 1) ? this : args.shift(),
        augf = function(n, v) {
            if(! (n in src)) {
                src[n] = v;
            }
        };
    for(var i = 0; i < args.length; i++) {
        acx.each(args[i], augf);
    }
    return src;
{'fraction_non_alphanumeric': 0.14246700045516614, 'fraction_numerical': 0.0018206645425580337, 'mean_word_length': 2.466876971608833, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3456536', 'n_tokens_mistral': 705, 'n_tokens_neox': 696, 'n_words': 228}