rem: console.log(data); 
context: io.on('connection', function(socket) {  socket.on('color', function(data) {    console.log(data);    if (data.id == 'all') {      lights.forEach(function(e) {        e.setColor(data.values);      });    } else {      lights[data.id].setColor(data.values);    }  });  socket.on('preset', function(preset) {    switch (parseInt(preset)) {      case 0:        lights.forEach(function(e) {          e.on();        });        break;      case 1:        lights.forEach(function(e) {          e.off();        });        break;      case 2:        lights.forEach(function(e) {          e.setColor([255, 255, 255]);        });        break;      case 3:        lights[0].setColor([255, 0, 0]);        lights[1].setColor([255, 255, 0]);        lights[2].setColor([0, 255, 0]);        lights[3].setColor([0, 0, 255]);        lights[4].setColor([255, 255, 0]);        lights[5].setColor([255, 0, 255]);        lights[6].setColor([0, 255, 255]);        lights[7].setColor([255, 0, 255]);        break;      case 4:        lights[7].setColor([255, 0, 0]);        lights[6].setColor([255, 0, 255]);        lights[5].setColor([0, 255, 0]);        lights[4].setColor([0, 0, 255]);        lights[3].setColor([255, 255, 0]);        lights[2].setColor([255, 0, 255]);        lights[1].setColor([0, 255, 255]);        lights[0].setColor([255, 0, 255]);        break;        break;      case 5:        lights[4].setColor([255, 0, 0]);        lights[5].setColor([255, 255, 0]);        lights[6].setColor([0, 255, 0]);        lights[7].setColor([0, 0, 255]);        lights[0].setColor([255, 255, 0]);        lights[1].setColor([255, 0, 255]);        lights[2].setColor([0, 255, 255]);        lights[3].setColor([255, 0, 255]);        break;      case 6:        lights.forEach(function(e) {          e.setStrobe(20);        });        break;      case 7:        lights.forEach(function(e) {          e.setStrobe(0);        });        break;    }  })});
meta: 3149	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3149/95cef1a1871e086da9cae895d8f1efaa33746b49/lightning.js/clean/lightning.js