title: How does the RxJs 5 share() operator work?
body: <p>Its not 100% clear for me how the RxJs 5 <code>share()</code> operator works, see here the <a href="https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/share.md">latest docs</a>. Jsbin for the question <a href="https://jsbin.com/lijemuy/edit?html,js,console">here</a>.</p>
  
  <p>If I create an observable with a series of 0 to 2, each value separated by one second:</p>
  
  <pre><code>var source = Rx.Observable.interval(1000)
  .take(5)
  .do(function (x) {
      console.log('some side effect');
  });
  </code></pre>
  
  <p>And if I create two subscribers to this observable:</p>
  
  <pre><code>source.subscribe((n) =&gt; console.log("subscriptor 1 = " + n));
  source.subscribe((n) =&gt; console.log("subscriptor 2 = " + n));
  </code></pre>
  
  <p>I get this in the console: </p>
  
  <pre><code>"some side effect ..."
  "subscriptor 1 = 0"
  "some side effect ..."
  "subscriptor 2 = 0"
  "some side effect ..."
  "subscriptor 1 = 1"
  "some side effect ..."
  "subscriptor 2 = 1"
  "some side effect ..."
  "subscriptor 1 = 2"
  "some side effect ..."
  "subscriptor 2 = 2"
  </code></pre>
  
  <p>I thought each subscription would subscribe to the same Observable, but it does not seem to be the case! Its like the act of subscribing creates a completely separate Observable! </p>
  
  <p>But if the <code>share()</code> operator is added to the source observable:</p>
  
  <pre><code>var source = Rx.Observable.interval(1000)
  .take(3)
  .do(function (x) {
      console.log('some side effect ...');
  })
  .share();
  </code></pre>
  
  <p>Then we get this:</p>
  
  <pre><code>"some side effect ..."
  "subscriptor 1 = 0"
  "subscriptor 2 = 0"
  "some side effect ..."
  "subscriptor 1 = 1"
  "subscriptor 2 = 1"
  "some side effect ..."
  "subscriptor 1 = 2"
  "subscriptor 2 = 2"
  </code></pre>
  
  <p>Which is what I would expect without the <code>share()</code>. </p>
  
  <p>Whats going on here, how does the <code>share()</code>operator work ?  Does each subscription create a new Observable chain?</p>