<commit_before>'use strict';

/**
 * Determine information about the failed validation
 * check.
 *
 * @param {any} value
 * @param {Object} result The error object
 * @returns {String} Human readable error message
 */
export default function getErrorClue(value, result) {
    switch(result.type) {
        case 'wrapper.validator':
            return `Custom validator failed for value "${value}".`;
        case 'wrapper.equals':
            return `The given value "${value}" did not strictly equal "${result.info.expectedValue}".`;
        case 'nativetype':
            return `Expected${result.optional ? `optional ` : ``} ${result.info.expectedType}, got ${result.info.got}.`;
        case 'instanceof':
            return `Expected${result.optional ? `optional ` : ``} instance of ${result.info.expectedInstance}, got ${result.info.got}.`;
        case 'array-literal':
            return `Expected${result.optional ? `optional ` : ``} array, got ${result.info.got}.`;
        case 'object-literal':
            return `Expected${result.optional ? `optional ` : ``} object, got ${result.info.got}.`;
    }
};<commit_msg>fix(getErrorClue): fix typos in error messages<commit_after>'use strict';

/**
 * Determine information about the failed validation
 * check.
 *
 * @param {any} value
 * @param {Object} result The error object
 * @returns {String} Human readable error message
 */
export default function getErrorClue(value, result) {
    switch(result.type) {
        case 'wrapper.validator':
            return `Custom validator failed for value "${value}".`;
        case 'wrapper.equals':
            return `The given value "${value}" did not strictly equal "${result.info.expectedValue}".`;
        case 'nativetype':
            return `Expected${result.optional ? ` optional` : ``} ${result.info.expectedType}, got ${result.info.got}.`;
        case 'instanceof':
            return `Expected${result.optional ? ` optional` : ``} instance of ${result.info.expectedInstance}, got ${result.info.got}.`;
        case 'array-literal':
            return `Expected${result.optional ? ` optional` : ``} array, got ${result.info.got}.`;
        case 'object-literal':
            return `Expected${result.optional ? ` optional` : ``} object, got ${result.info.got}.`;
    }
};
{'fraction_non_alphanumeric': 0.1542158147662735, 'fraction_numerical': 0.0, 'mean_word_length': 3.045936395759717, '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': '340533', 'n_tokens_mistral': 623, 'n_tokens_neox': 618, 'n_words': 175}