How to create a function for dynamic find document in Metor.js?

I want to create a function for dynamic find document in Meteor.js. For instance I have Students Collection and I want to find students by name, gender, phone.... if name is provide I want to find name like the name that is provided, if gender is provide I want to find gender which is equal to gender that is provided, if phone is provide I want to find phone like the phone that is provided, and if name or gender or phone is not provided, I want to find the all the name and all gender and all phone.
In SQL Server I will create the stored Procedure like this:

Create PROCEDURE [dbo].[pG_Student]    
   @pName nvarchar(250)=null,
   @pGender nvarchar(50)=null,
   @pPhone nvarchar(100)=null
AS
BEGIN
    SELECT * FROM [dbo].[StudentView]
    WHERE (LOWER(Name) like '%'+LOWER(@pName)+'%'  or @pName is null)
    and (Gender=@pGender or @pGender is null) 
    and (LOWER([Phone]) like '%'+LOWER(@pPhone)+'%'  or @pPhone is null) 
END

With this Stored Procedure I can call with C#.

How about with Meteor.js?

You can conditionally define your Mongo selector.

Students = new Mongo.Collection("students");
var findStudents = function(params) {
  var selector = {};
  if (params.name) selector.name = new RegExp(params.name,  "i");
  if (params.phone) selector.phone = new RegExp(params.phone,  "i");
  if (params.gender) selector.gender = params.gender;
  return Students.find(selector);
}

Thank you for your help.

If I have to made a search in three field, something that in Oracle like this:

select * from table
where (field1 like ‘%value%’ or field2 like ‘%value%’ or field3 like '%value%) and
field4 = :value and field5 = :value

How can I dynamically define this selector?