<commit_before>/* eslint-disable prefer-template, max-len */
const bindingErrorPrefix = 'Binding error:';
const calcErrorPrefix = 'Calc error:';
const eventsErrorPrefix = 'Events error:';
const arrayErrorPrefix = 'Matreshka.Array error:';

const getType = (variable) => {
    if (variable === null) {
        return 'null';
    }

    return typeof variable;
};
const getTypeError = (variable, variableName, expectedType) =>
    `${variableName} must have type "${expectedType}" but got "${getType(variable)}" instead.`;

const errors = {
    'common:object_type': ({ object, method }) => `Error in ${method}:`
        + getTypeError(object, 'object', 'object'),
    'common:call_class': () => 'Cannot call a class as a function',
    'common:use_magic_props': () =>
        '"sandbox" key (for all objects) and "container" key (for Matreshka.Array instances)'<commit_msg>refactor: Minor change at matreshkaError function<commit_after>/* eslint-disable prefer-template, max-len */
const bindingErrorPrefix = 'Binding error:';
const calcErrorPrefix = 'Calc error:';
const eventsErrorPrefix = 'Events error:';
const arrayErrorPrefix = 'Matreshka.Array error:';

const getType = (variable) => {
    if (variable === null) {
        return 'null';
    }

    return typeof variable;
};
const getTypeError = (variable, variableName, expectedType) =>
    `${variableName} must have type "${expectedType}" but got "${getType(variable)}" instead.`;

const errors = {
    'common:object_type': ({ object, method }) => `Error in ${method}: `
        + getTypeError(object, 'object', 'object'),
    'common:call_class': () => 'Cannot call a class as a function',
    'common:use_magic_props': () =>
        '"sandbox" key (for all objects) and "container" key (for Matreshka.Array instances)'
{'fraction_non_alphanumeric': 0.15328467153284672, 'fraction_numerical': 0.0, 'mean_word_length': 4.38368580060423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7564592', 'n_tokens_mistral': 517, 'n_tokens_neox': 514, 'n_words': 158}