<commit_before>/**
 * @file Serializable properties helper
 */
/*#ifndef(UMD)*/
"use strict";
/*global _gpfAttributesGet*/ // Get attributes defined for the object / class
/*global _gpfAttributesSerializable*/ // Shortcut for gpf.attributes.Serializable
/*global _gpfObjectForEach*/ // Similar to [].forEach but for objects
/*exported _gpfSerialGet*/ // Collect gpf.typedef.serializableProperty defined for the object / class
/*#endif*/

/**
 * Collect {@link gpf.typedef.serializableProperty} defined for the object / class
 *
 * @param {Object|Function} objectOrClass Object instance or class constructor
 * @return {Object} Dictionary of {@link gpf.typedef.serializableProperty} index by member
 */
function _gpfSerialGet (objectOrClass) {
    var serializable = _gpfAttributesGet(objectOrClass, _gpfAttributesSerializable),
        properties = {};
    _gpfObjectForEach(serializable, function (attributes, member) {
        properties[member] = attributes[0].getProperty();
    });
    return properties;
}

/** @gpf:sameas _gpfSerialGet*/
gpf.serial.get = _gpfSerialGet;<commit_msg>Documentation (#288)<commit_after>/**
 * @file Serializable properties helper
 * @since 0.2.8
 */
/*#ifndef(UMD)*/
"use strict";
/*global _gpfAttributesGet*/ // Get attributes defined for the object / class
/*global _gpfAttributesSerializable*/ // Shortcut for gpf.attributes.Serializable
/*global _gpfObjectForEach*/ // Similar to [].forEach but for objects
/*exported _gpfSerialGet*/ // Collect gpf.typedef.serializableProperty defined for the object / class
/*#endif*/

/**
 * Collect {@link gpf.typedef.serializableProperty} defined for the object / class
 *
 * @param {Object|Function} objectOrClass Object instance or class constructor
 * @return {Object} Dictionary of {@link gpf.typedef.serializableProperty} index by member
 * @since 0.2.8
 */
function _gpfSerialGet (objectOrClass) {
    var serializable = _gpfAttributesGet(objectOrClass, _gpfAttributesSerializable),
        properties = {};
    _gpfObjectForEach(serializable, function (attributes, member) {
        properties[member] = attributes[0].getProperty();
    });
    return properties;
}

/**
 * @gpf:sameas _gpfSerialGet
 * @since 0.2.8
 */
gpf.serial.get = _gpfSerialGet;
{'fraction_non_alphanumeric': 0.12164579606440072, 'fraction_numerical': 0.006261180679785331, 'mean_word_length': 4.509852216748769, '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': '1631233', 'n_tokens_mistral': 655, 'n_tokens_neox': 636, 'n_words': 176}