From what I can gather, the requests array seems to consist of functions with unique formatting and syntax. However, I'm struggling to find relevant search terms to help me better understand it:
var requests = {
rewardPoints: function(cb) {
io.getRewardPoints(require.mozuData('user').accountId).then(function(rewards) {
add('rewardPoints', rewards);
cb();
}, function() {
add('rewardPoints', null);
cb();
});
},
segment: function(cb) {
io.getMySegment().then(function(res) {
add('segment', res);
cb();
}, cb);
}, ...................
The code snippet continues with additional names followed by a colon in a similar manner. Is this perhaps an array where each variable serves as a function? Can I invoke these functions using their names as I would with any other function? For example:
rewardPoints();
segment();
Is there a specific term or practice associated with this convention?