<commit_before><!doctype html>
<html>
<head>
  <meta charset='utf-8' />
  <title>  | Documentation</title>
  <meta name='viewport' content='width=device-width,initial-scale=1'>
  <link href='assets/bass.css' type='text/css' rel='stylesheet' />
  <link href='assets/style.css' type='text/css' rel='stylesheet' />
  <link href='assets/github.css' type='text/css' rel='stylesheet' />
</head>
<body class='documentation'>
  <div class='container'>
    <div class='clearfix md-mxn2'>
      <div class='fixed md-show fix-3 overflow-auto max-height-100'>
        <div class='py1 px2'>
          <h3 class='mb0 no-anchor'></h3>
          <div class='mb1'><code></code></div>
          <input
            placeholder='Filter'
            id='filter-input'
            class='col12 block field'
            type='text' />
          <div id='toc'>
              <a
                href='#createLocation'
                class='block bold'>
                createLocation
              </a>
              <a
                href='#createServerHistory'
                class='block bold'>
                createServerHistory
              </a>
              <a
                href='#historyDriver'
                class='block bold'>
                historyDriver
              </a>
              <a
                href='#location'
                class='block bold'>
                location
              </a>
              <a
                href='#makeHistoryDriver'
                class='block bold'>
                makeHistoryDriver
              </a>
              <a
                href='#ServerHistory'
                class='block bold'>
                ServerHistory
              </a>
              <a
                href='#supportsHistory'
                class='block bold'>
                supportsHistory
              </a>
          </div>
        </div>
      </div>
      <div class='fix-margin-3'>
        <div class='px2'>
<div class='py1'><section class='py2 clearfix'>
  <h2 id='createLocation' class='mt0'>
    createLocation<span class='gray'>([location])</span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/util.js#L80-L85'><code>src/util.js</code></a></p>
  
  
  
  
  
  <p>Create a location object - particularly useful for server-side rendering</p>

    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
=
 <strong>location</strong>
            (default <code>locationDefaults</code>)
          :
          <div class='force-inline'>
            <p>A location as
defined by <a href="https://github.com/rackt/history/blob/master/docs/Glossary.md#location">rackt/history</a>
with sane defaults</p>

          </div>
        </li>
    </ul>
      <h4>Returns</h4>
      <code><a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
</code>
      :
      <div class='force-inline'>
        <p>a complete location object as defined by
<a href="https://github.com/rackt/history/blob/master/docs/Glossary.md#location">rackt/history</a></p>

      </div>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='createServerHistory' class='mt0'>
    createServerHistory<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/serverHistory.js#L81-L83'><code>src/serverHistory.js</code></a></p>
  
  
  
  
  
  
      <h4>Returns</h4>
      <code>ServerHistory
</code>
      
      <div class='force-inline'>
        
      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-comment">// server-side</span>
<span class="hljs-keyword">import</span> express <span class="hljs-keyword">from</span> <span class="hljs-string">'express'</span>
<span class="hljs-keyword">import</span> {run} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/core'</span>
<span class="hljs-keyword">import</span> {
  makeHistoryDriver,
  createServerHistory,
  createLocation
} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/history'</span>
<span class="hljs-keyword">import</span> {makeHTMLDriver} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/dom'</span>

<span class="hljs-keyword">const</span> app = express()

app.use((res, req) =&gt; {
  ...
  const history = createServerHistory()
  <span class="hljs-keyword">const</span> {sources} = run(main, {
    history: makeHistoryDriver(history),
    html: makeHTMLDriver(),
  })

  history.push(createLocation(req.url))

  sources.html.subscribe(html =&gt; res.end(html))
  ...
})

app.listen(<span class="hljs-number">3000</span>)</pre>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='historyDriver' class='mt0'>
    historyDriver<span class='gray'>(sink$)</span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/makeHistoryDriver.js#L76-L92'><code>src/makeHistoryDriver.js</code></a></p>
  
  
  
  
  
  <p>The history driver used by run()</p>

    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
        <li>Observable
.<
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
>
 <strong>sink$</strong>
          :
          <div class='force-inline'>
            <p>The output returned from your main()
function. This can be a URL string, any valid Location object, or an object
with a type key to execute a particular history function like goBack(),
goForward(). When using type: 'go' a <code>value</code> key is expected to have an
integer with how many locations to go back or forward.</p>

          </div>
        </li>
    </ul>
      <h4>Returns</h4>
      <code>Observable
.<
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
>
</code>
      :
      <div class='force-inline'>
        <p>An Observable containing the current
location you have navigated to.</p>

      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-keyword">return</span> { history: Observable.just({type: <span class="hljs-string">'go'</span>, value: <span class="hljs-number">-2</span>}) }
<span class="hljs-keyword">return</span> { history: Observable.just(<span class="hljs-string">'/some/path'</span>)} }
<span class="hljs-keyword">return</span> { history: Observable.just({pathname: <span class="hljs-string">'/some/path'</span>, state: {some: <span class="hljs-string">'state'</span>}}) }</pre>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='location' class='mt0'>
    location<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/util.js#L60-L68'><code>src/util.js</code></a></p>
  
  
  
  
  
  <p>Default parameters for createLocation; Same structure used by rackt/history</p>

    <h4>Properties</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>pathname</strong>
              :
              <div class='force-inline'>
                <p>defaults to '/'</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>action</strong>
              :
              <div class='force-inline'>
                <p>defaults to 'POP'</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>hash</strong>
              :
              <div class='force-inline'>
                <p>defaults to ''</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>search</strong>
              :
              <div class='force-inline'>
                <p>defaults to  ''</p>

              </div>
            </li>
        <li>(
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>
|
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">Null</a>
)
 <strong>state</strong>
              :
              <div class='force-inline'>
                <p>defautls to null</p>

              </div>
            </li>
        <li>(
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
|
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">Null</a>
)
 <strong>key</strong>
              :
              <div class='force-inline'>
                <p>defaults to null</p>

              </div>
            </li>
    </li>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='makeHistoryDriver' class='mt0'>
    makeHistoryDriver<span class='gray'>(history, options)</span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/makeHistoryDriver.js#L45-L93'><code>src/makeHistoryDriver.js</code></a></p>
  
  
  
  
  
  <p>Instantiates an new history driver function using a valid history object.</p>

    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>
 <strong>history</strong>
          :
          <div class='force-inline'>
            <p>a valid history instance as defined by
ractk/history. Should have <code>createLocation()</code>, <code>createHref()</code>, <code>listen()</code>,
and <code>push()</code> methods.</p>

          </div>
        </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>
 <strong>options</strong>
          :
          <div class='force-inline'>
            <p>options object - currently accepts a <code>boolean</code> for
the parameter <code>capture</code>. <code>capture</code> will automatically capture link clicks.</p>

          </div>
        </li>
    </ul>
      <h4>Returns</h4>
      <code>historyDriver
</code>
      :
      <div class='force-inline'>
        <p>The history driver function</p>

      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-keyword">import</span> {run} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/core'</span>
<span class="hljs-keyword">import</span> {makeHistoryDriver} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/history'</span>
<span class="hljs-keyword">import</span> {useQueries, createHashHistory} form <span class="hljs-string">'history'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params">sources</span>) </span>{...}

<span class="hljs-keyword">const</span> history = createHashHistory()
run(main, {
  history: makeHistoryDriver(history),
})</pre>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='ServerHistory' class='mt0'>
    ServerHistory<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/serverHistory.js#L17-L19'><code>src/serverHistory.js</code></a></p>
  
  
  
  
  
  
    <h4>Properties</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>listen</strong>
              :
              <div class='force-inline'>
                <p>a way to listen for location changes (used internally)</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>push</strong>
              :
              <div class='force-inline'>
                <p>a way to push new locations to listeners.
Can be used to push url changes on the server-side.</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>replace</strong>
              :
              <div class='force-inline'>
                <p>a way to replace the current location -
effectively the same as push() in this instance. (used internally)</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>createHref</strong>
              :
              <div class='force-inline'>
                <p>creates an HREF (used internally)</p>

              </div>
            </li>
        <li>createLocation
 <strong>createLocation</strong>
            </li>
    </li>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='supportsHistory' class='mt0'>
    supportsHistory<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/2494fd2c520c0b1a38cfbd261e76770d2d72da88/src/util.js#L24-L45'><code>src/util.js</code></a></p>
  
  
  
  
  
  <p>Function that returns whether or not the current environment
supports the HistoryAPI</p>

      <h4>Returns</h4>
      <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>
</code>
      :
      <div class='force-inline'>
        <p>Returns true if the current environment supports
the History API; false if it does not.</p>

      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-keyword">import</span> {run} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/core'</span>
<span class="hljs-keyword">import</span> {makeHistoryDriver, supportsHistory} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/history'</span>
<span class="hljs-keyword">import</span> {createHashHistory, createHistory} <span class="hljs-keyword">from</span> <span class="hljs-string">'history'</span>
<commit_msg>chore(): build docs/<commit_after><!doctype html>
<html>
<head>
  <meta charset='utf-8' />
  <title>  | Documentation</title>
  <meta name='viewport' content='width=device-width,initial-scale=1'>
  <link href='assets/bass.css' type='text/css' rel='stylesheet' />
  <link href='assets/style.css' type='text/css' rel='stylesheet' />
  <link href='assets/github.css' type='text/css' rel='stylesheet' />
</head>
<body class='documentation'>
  <div class='container'>
    <div class='clearfix md-mxn2'>
      <div class='fixed md-show fix-3 overflow-auto max-height-100'>
        <div class='py1 px2'>
          <h3 class='mb0 no-anchor'></h3>
          <div class='mb1'><code></code></div>
          <input
            placeholder='Filter'
            id='filter-input'
            class='col12 block field'
            type='text' />
          <div id='toc'>
              <a
                href='#createLocation'
                class='block bold'>
                createLocation
              </a>
              <a
                href='#createServerHistory'
                class='block bold'>
                createServerHistory
              </a>
              <a
                href='#historyDriver'
                class='block bold'>
                historyDriver
              </a>
              <a
                href='#location'
                class='block bold'>
                location
              </a>
              <a
                href='#makeHistoryDriver'
                class='block bold'>
                makeHistoryDriver
              </a>
              <a
                href='#ServerHistory'
                class='block bold'>
                ServerHistory
              </a>
              <a
                href='#supportsHistory'
                class='block bold'>
                supportsHistory
              </a>
          </div>
        </div>
      </div>
      <div class='fix-margin-3'>
        <div class='px2'>
<div class='py1'><section class='py2 clearfix'>
  <h2 id='createLocation' class='mt0'>
    createLocation<span class='gray'>([location])</span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/util.js#L80-L85'><code>src/util.js</code></a></p>
  
  
  
  
  
  <p>Create a location object - particularly useful for server-side rendering</p>

    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
=
 <strong>location</strong>
            (default <code>locationDefaults</code>)
          :
          <div class='force-inline'>
            <p>A location as
defined by <a href="https://github.com/rackt/history/blob/master/docs/Glossary.md#location">rackt/history</a>
with sane defaults</p>

          </div>
        </li>
    </ul>
      <h4>Returns</h4>
      <code><a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
</code>
      :
      <div class='force-inline'>
        <p>a complete location object as defined by
<a href="https://github.com/rackt/history/blob/master/docs/Glossary.md#location">rackt/history</a></p>

      </div>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='createServerHistory' class='mt0'>
    createServerHistory<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/serverHistory.js#L81-L83'><code>src/serverHistory.js</code></a></p>
  
  
  
  
  
  
      <h4>Returns</h4>
      <code>ServerHistory
</code>
      
      <div class='force-inline'>
        
      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-comment">// server-side</span>
<span class="hljs-keyword">import</span> express <span class="hljs-keyword">from</span> <span class="hljs-string">'express'</span>
<span class="hljs-keyword">import</span> {run} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/core'</span>
<span class="hljs-keyword">import</span> {
  makeHistoryDriver,
  createServerHistory,
  createLocation
} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/history'</span>
<span class="hljs-keyword">import</span> {makeHTMLDriver} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/dom'</span>

<span class="hljs-keyword">const</span> app = express()

app.use((res, req) =&gt; {
  ...
  const history = createServerHistory()
  <span class="hljs-keyword">const</span> {sources} = run(main, {
    history: makeHistoryDriver(history),
    html: makeHTMLDriver(),
  })

  history.push(createLocation(req.url))

  sources.html.subscribe(html =&gt; res.end(html))
  ...
})

app.listen(<span class="hljs-number">3000</span>)</pre>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='historyDriver' class='mt0'>
    historyDriver<span class='gray'>(sink$)</span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/makeHistoryDriver.js#L76-L92'><code>src/makeHistoryDriver.js</code></a></p>
  
  
  
  
  
  <p>The history driver used by run()</p>

    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
        <li>Observable
.<
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
>
 <strong>sink$</strong>
          :
          <div class='force-inline'>
            <p>The output returned from your main()
function. This can be a URL string, any valid Location object, or an object
with a type key to execute a particular history function like goBack(),
goForward(). When using type: 'go' a <code>value</code> key is expected to have an
integer with how many locations to go back or forward.</p>

          </div>
        </li>
    </ul>
      <h4>Returns</h4>
      <code>Observable
.<
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Location">location</a>
>
</code>
      :
      <div class='force-inline'>
        <p>An Observable containing the current
location you have navigated to.</p>

      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-keyword">return</span> { history: Observable.just({type: <span class="hljs-string">'go'</span>, value: <span class="hljs-number">-2</span>}) }
<span class="hljs-keyword">return</span> { history: Observable.just(<span class="hljs-string">'/some/path'</span>)} }
<span class="hljs-keyword">return</span> { history: Observable.just({pathname: <span class="hljs-string">'/some/path'</span>, state: {some: <span class="hljs-string">'state'</span>}}) }</pre>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='location' class='mt0'>
    location<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/util.js#L60-L68'><code>src/util.js</code></a></p>
  
  
  
  
  
  <p>Default parameters for createLocation; Same structure used by rackt/history</p>

    <h4>Properties</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>pathname</strong>
              :
              <div class='force-inline'>
                <p>defaults to '/'</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>action</strong>
              :
              <div class='force-inline'>
                <p>defaults to 'POP'</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>hash</strong>
              :
              <div class='force-inline'>
                <p>defaults to ''</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
 <strong>search</strong>
              :
              <div class='force-inline'>
                <p>defaults to  ''</p>

              </div>
            </li>
        <li>(
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>
|
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">Null</a>
)
 <strong>state</strong>
              :
              <div class='force-inline'>
                <p>defautls to null</p>

              </div>
            </li>
        <li>(
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
|
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null">Null</a>
)
 <strong>key</strong>
              :
              <div class='force-inline'>
                <p>defaults to null</p>

              </div>
            </li>
    </li>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='makeHistoryDriver' class='mt0'>
    makeHistoryDriver<span class='gray'>(history, options)</span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/makeHistoryDriver.js#L45-L93'><code>src/makeHistoryDriver.js</code></a></p>
  
  
  
  
  
  <p>Instantiates an new history driver function using a valid history object.</p>

    <h4>Parameters</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>
 <strong>history</strong>
          :
          <div class='force-inline'>
            <p>a valid history instance as defined by
ractk/history. Should have <code>createLocation()</code>, <code>createHref()</code>, <code>listen()</code>,
and <code>push()</code> methods.</p>

          </div>
        </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>
 <strong>options</strong>
          :
          <div class='force-inline'>
            <p>options object - currently accepts a <code>boolean</code> for
the parameter <code>capture</code>. <code>capture</code> will automatically capture link clicks.</p>

          </div>
        </li>
    </ul>
      <h4>Returns</h4>
      <code>historyDriver
</code>
      :
      <div class='force-inline'>
        <p>The history driver function</p>

      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-keyword">import</span> {run} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/core'</span>
<span class="hljs-keyword">import</span> {makeHistoryDriver} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/history'</span>
<span class="hljs-keyword">import</span> {useQueries, createHashHistory} form <span class="hljs-string">'history'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params">sources</span>) </span>{...}

<span class="hljs-keyword">const</span> history = createHashHistory()
run(main, {
  history: makeHistoryDriver(history),
})</pre>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='ServerHistory' class='mt0'>
    ServerHistory<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/serverHistory.js#L17-L19'><code>src/serverHistory.js</code></a></p>
  
  
  
  
  
  
    <h4>Properties</h4>
    <ul class='suppress-p-margin'>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>listen</strong>
              :
              <div class='force-inline'>
                <p>a way to listen for location changes (used internally)</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>push</strong>
              :
              <div class='force-inline'>
                <p>a way to push new locations to listeners.
Can be used to push url changes on the server-side.</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>replace</strong>
              :
              <div class='force-inline'>
                <p>a way to replace the current location -
effectively the same as push() in this instance. (used internally)</p>

              </div>
            </li>
        <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function">function</a>
 <strong>createHref</strong>
              :
              <div class='force-inline'>
                <p>creates an HREF (used internally)</p>

              </div>
            </li>
        <li>createLocation
 <strong>createLocation</strong>
            </li>
    </li>
</section>
</div><div class='py1'><section class='py2 clearfix'>
  <h2 id='supportsHistory' class='mt0'>
    supportsHistory<span class='gray'></span>
  </h2>
    <p><a href='https://github.com/cyclejs/cycle-history/blob/dcbc396d04bcd55d2d1094b37d12787906eb7905/src/util.js#L24-L45'><code>src/util.js</code></a></p>
  
  
  
  
  
  <p>Function that returns whether or not the current environment
supports the HistoryAPI</p>

      <h4>Returns</h4>
      <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>
</code>
      :
      <div class='force-inline'>
        <p>Returns true if the current environment supports
the History API; false if it does not.</p>

      </div>
    <h4>Examples</h4>
<pre class='overflow-auto'><span class="hljs-keyword">import</span> {run} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/core'</span>
<span class="hljs-keyword">import</span> {makeHistoryDriver, supportsHistory} <span class="hljs-keyword">from</span> <span class="hljs-string">'@cycle/history'</span>
<span class="hljs-keyword">import</span> {createHashHistory, createHistory} <span class="hljs-keyword">from</span> <span class="hljs-string">'history'</span>

{'fraction_non_alphanumeric': 0.17667327973269292, 'fraction_numerical': 0.020291671017368, 'mean_word_length': 2.7450469238790407, 'pattern_counts': {'":': 0, '<': 987, '<?xml version=': 0, '>': 987, 'https://': 56, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6165065', 'n_tokens_mistral': 9806, 'n_tokens_neox': 9216, 'n_words': 1514}