Get rid of whitespace on otherwise empty lines Ah, yet another of my selfish uses of this Stack.
Being a Chromebook owner, I'm a frequent user of the Ace IDE, the editor used by Cloud9. It has lots of tools for dealing with excess whitespace, but it notably lacks one: clearing empty lines.
Your mission today is, given an input from a place I can copy-paste to [;)], output something identical, save all spaces and tabulators on otherwise empty lines.
I'll give some examples, with #s representing whitespace characters to be removed.


INPUT 1:
if (this.Color !== 'blue') {
##
  this.Color = 'blue';
}

OUTPUT:
if (this.Color !== 'blue') {
[empty line]
  this.Color = 'blue';
}


INPUT 2:
function outputSomething(times) {
  for (var iter = 0; iter &lt; times; iter++) {
    console.log('&quot;# # &quot; represents a tabulator');
    // This is a comment
# # 
}}

OUTPUT:
function outputSomething(times) {
  for (var iter = 0; iter &lt; times; iter++) {
    console.log('&quot;# # &quot; represents a tabulator');
    // This is a comment
[empty line]
}}


INPUT 3:
var x = 'Do you prefer spaces or tabs?';
var y = 'I\'m using both here. Sue me.';
# # ####
console.log(x + ' ' + y);

OUTPUT:
var x = 'Do you prefer spaces or tabs?';
var y = 'I\'m using both here. Sue me.';
[empty line]
console.log(x + ' ' + y);


You may process the input however you like. Output wherever, so long as I can copy-paste from it [;)].
Standard loopholes apply, shortest answer in bytes wins!
Retina, 5 bytes

%G`\S


Try it online!

A not so obvious approach rewards us with a better score :)

Explanation

G indicates this as a Grep stage, keeping only those lines where a match to the regex given (\S, matches non-space characters) can be found. If it wasn't for the starting % this would completely remove lines instead of just "emptying" them. 

The % is a modifier which applies the stage once to each line and then joins the results with newlines: in our case this means that the empty string returned by Grep for whitespace-only lines will become an empty line in the result.