Every line of 'mongoose or' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
33 function $or (value, esQuery, idProp) { 34 validateType(value, '$or', 'array'); 35 36 esQuery.should = esQuery.should || []; 37 esQuery.should.push(...value 38 .map(subQuery => parseQuery(subQuery, idProp)) 39 .filter(parsed => !!parsed) 40 .map(parsed => ({ bool: parsed })) 41 ); 42 esQuery.minimum_should_match = 1; 43 44 return esQuery; 45 }
134 or (index) { 135 assert(this._where, QueryError, 'Can not have a .or() before a .where()') 136 // TODO 137 }