title: Split strings but preserve delimiters in the array of splits
body: <p>Given a string like the following in JavaScript</p>
  
  <pre><code>var a = 'hello world\n\nbye world\n\nfoo\nbar\n\nfoo\nbaz\n\n';
  </code></pre>
  
  <p>I want to split it into an array like this</p>
  
  <pre><code>['hello world', '\n\n', 'bye world', '\n\n', 'foo\nbar', '\n\n', 'foo\nbaz', '\n\n'].
  </code></pre>
  
  <p>If the input is <code>var a = 'hello world\n\nbye world'</code>, the result should be <code>['hello world', '\n\n', 'bye world']</code>.</p>
  
  <p>In other words, I want to split the string around '\n\n' into an array such that the array contains the '\n\n' as well. Is there any neat way to do this in JavaScript?</p>