I'm trying to implement a search like in the thread: Meteor publish/subscribe strategies for unique client-side collections. I have wrapped the function in Meteor.startup as follows, but am still getting a reference error on the getSearchUsers function call.
Meteor.startup(function () {
function getSearchUsers(query) {
var re = new RegExp(query, "i");
return Users.find({name: {$regex: re}});
}
});