// TODO: Rename this to something more appropriate, like any/anyOf? How to make sure that doesn't cause confusion with `oneOf`?
constValidationError=require("@validatem/error");
constcombinator=require("@validatem/combinator");
module.exports=function(alternatives){
if(!Array.isArray(alternatives)){
thrownewError(`Must specify an array of alternatives`);
}elseif(alternatives.length<2){
// This doesn't interfere with conditionally-specified alternatives using ternary expressions, because in those cases there is still *some* item specified, it's just going to have a value of `undefined` (and will subsequently be filtered out)
thrownewError("Must specify at least two alternatives");
}elseif(arguments.length>1){
thrownewError(`Only one argument is accepted; maybe you forgot to wrap the different alternatives into an array?`);