<commit_before>'use strict';

/**
 * maybe-baby: Maybe monad for JavaScript
 * Credit to <NAME> (https://twitter.com/jrsinclair)
 * http://jrsinclair.com/articles/2016/marvellously-mysterious-javascript-maybe-monad/
 */

const Maybe = function (val) {
    this.__value = val;
};

Maybe.of = function (val) {
    return new Maybe(val);
};

Maybe.prototype.isNothing = function () {
    return (this.__value === null || this.__value === undefined);
};

Maybe.prototype.isJust = function () {
    return !this.isNothing();
};

Maybe.prototype.join = function () {
    return this.__value;
};

Maybe.prototype.chain = function (transform) {
    return this.map(transform).join();
};

Maybe.prototype.prop = function (property) {
    return this.map(
        function (value) {
            return value[property];
        }
    );
};
<commit_msg>Reverting const to var for compat<commit_after>'use strict';

/**
 * maybe-baby: Maybe monad for JavaScript
 * Credit to <NAME> (https://twitter.com/jrsinclair)
 * http://jrsinclair.com/articles/2016/marvellously-mysterious-javascript-maybe-monad/
 */

var Maybe = function (val) {
    this.__value = val;
};

Maybe.of = function (val) {
    return new Maybe(val);
};

Maybe.prototype.isNothing = function () {
    return (this.__value === null || this.__value === undefined);
};

Maybe.prototype.isJust = function () {
    return !this.isNothing();
};

Maybe.prototype.join = function () {
    return this.__value;
};

Maybe.prototype.chain = function (transform) {
    return this.map(transform).join();
};

Maybe.prototype.prop = function (property) {
    return this.map(
        function (value) {
            return value[property];
        }
    );
};

{'fraction_non_alphanumeric': 0.15764705882352942, 'fraction_numerical': 0.004705882352941176, 'mean_word_length': 3.2313432835820897, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3556201', 'n_tokens_mistral': 538, 'n_tokens_neox': 527, 'n_words': 111}