Reputation: 13
Take a look at this sample code:
Meteor.methods({
'tasks.insert'(text) {
check(text, String);
// and other stuff...
},
'tasks.remove'(taskId) {
check(taskId, String);
Tasks.remove(taskId);
},
});
methods() function tooks js object literal, but inside that object you don't have standard name-value pairs. Why?
Upvotes: 1
Views: 37
Reputation: 8519
As specified on the Creating an app page, the example code uses ECMAScript 2015 features. The specific feature you mention is enhanced object literal syntax, which is described here.
Upvotes: 1