HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/node_modules/codelyzer/util/function.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listToMaybe = exports.ifTrue = exports.any = exports.all = exports.unwrapFirst = exports.Maybe = void 0;
function nullOrUndef(t) {
    return t === null || t === undefined;
}
var Maybe = (function () {
    function Maybe(t) {
        this.t = t;
    }
    Maybe.lift = function (t) {
        return new Maybe(nullOrUndef(t) ? undefined : t);
    };
    Maybe.all = function (t0, t1) {
        return t0.bind(function (_t0) { return t1.fmap(function (_t1) { return [_t0, _t1]; }); });
    };
    Maybe.prototype.bind = function (fn) {
        return nullOrUndef(this.t) ? Maybe.nothing : fn(this.t);
    };
    Maybe.prototype.fmap = function (fn) {
        return this.bind(function (t) { return Maybe.lift(fn(t)); });
    };
    Object.defineProperty(Maybe.prototype, "isNothing", {
        get: function () {
            return nullOrUndef(this.t);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(Maybe.prototype, "isSomething", {
        get: function () {
            return !nullOrUndef(this.t);
        },
        enumerable: false,
        configurable: true
    });
    Maybe.prototype.catch = function (def) {
        if (this.isNothing) {
            return def();
        }
        return this;
    };
    Maybe.prototype.unwrap = function () {
        return this.t;
    };
    Maybe.nothing = new Maybe(undefined);
    return Maybe;
}());
exports.Maybe = Maybe;
function unwrapFirst(ts) {
    var f = ts.find(function (t) { return t.isSomething; });
    if (f) {
        return f.unwrap();
    }
    return undefined;
}
exports.unwrapFirst = unwrapFirst;
function all() {
    var preds = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        preds[_i] = arguments[_i];
    }
    return function (t) { return !preds.find(function (p) { return !p(t); }); };
}
exports.all = all;
function any() {
    var preds = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        preds[_i] = arguments[_i];
    }
    return function (t) { return !!preds.find(function (p) { return p(t); }); };
}
exports.any = any;
function ifTrue(pred) {
    return function (t) { return (pred(t) ? Maybe.lift(t) : Maybe.nothing); };
}
exports.ifTrue = ifTrue;
function listToMaybe(ms) {
    var unWrapped = (ms || []).filter(function (m) { return m.isSomething; }).map(function (m) { return m.unwrap(); });
    return unWrapped.length === 0 ? Maybe.nothing : Maybe.lift(unWrapped);
}
exports.listToMaybe = listToMaybe;