prototypes/fluxions/count_nextTick.js
var flx = require('./lib/flx_nextTick')
, web = require('./lib/web_nextTick');
flx.register("input", function(msg){
this.uid[msg.uid] = this.uid[msg.uid] + 1 || 1;
msg.count = this.uid[msg.uid];
return this.m("view", msg);
},{
uid: {}
});
flx.register("view", function(msg) {
msg.view = msg.uid + "[" + msg.count + "]";
msg.uid = undefined;
msg.count = undefined;
return this.m("output", msg);
})
web.listen();