Skip to main content
1 of 6
whiskers75
  • 197
  • 2
  • 9

Node.JS Buffer has a newline after it

How do I remove the newline from this code:

 socket.on('data', function(data){ console.log('Data in server, sending to handle()'); worker.handle(data, socket); }); 

Worker.handle():

 exports.handle = function handle(command, socket) { console.log('Data sent to handle()'); command = command.toString(); console.log(command); 

?

whiskers75
  • 197
  • 2
  • 9