import { assert } from "../../assert.js";

/**
 * Joins two matchers via OR
 * @param {function(*):boolean} a
 * @param {function(*):boolean} b
 * @returns {function(*):boolean}
 */
export function or(a, b) {
    assert.isFunction(a, 'a');
    assert.isFunction(b, 'b');

    return function (m) {
        return a(m) || b(m);
    }
}