there are a number of problem with your code that means it is not doing what you think it is doing and will be stuck in the while loop forever.
var endtag, cutout, content = msg.payload; // msg is the ATOM feed
while (content.indexOf("Wind" > -1))
Your condition in the while loop is
content.indexOf("Wind" > -1) - you have the
> -1 inside the argument passed to the
indexOf function. It should be
content.indexOf("Wind") > -1. That is why your while loop repeats forever.
endtag = content.indexOf(".", "Wind");
indexOf function can take two arguments, but the second argument is expected to be the character position to start searching from. You are passing
Wind as that second argument, so I'm not sure what result you'll get.
cutout = content.slice("Wind", endtag + 1);
slice function also takes two arguments - the start position and the end position. Again, you are passing in the string
Wind as the start position, rather than a number.
content = content.replace(cutout, "");
What exactly is the goal of the while loop? Is it to remove all instances of the word
Wind from msg.payload? If so, you can do it without a while loop using:
msg.payload = msg.payload.replace(/Wind/g,"");