JS code for a string that varies by % on stream