Reputation: 8376
I have a Meteor package that exports several server methods. Since there's no widespread convention on how a method should be named, I want to make more than one names for each method. At first, I used calls to the first method from other ones:
Meteor.methods({
a: function () {
return 'something';
},
b: function () {
return Meteor.call('a');
}
});
Now I use a simpler approach:
const something = function () {
return 'something';
};
Meteor.methods({
a: something,
b: something
});
But is there even simpler, or maybe even conventional, approach to do that?
Upvotes: 0
Views: 48