<commit_before># API Reference

This document is an API reference for [the history JavaScript
library](https://github.com/ReactTraining/history).

Although there are several APIs in the history library, the main interfaces are:

- The create* methods:
  - [`createBrowserHistory({ window?: Window })`](#createbrowserhistory)
  - [`createHashHistory({ window?: Window })`](#createhashhistory)
  - [`createMemoryHistory({ initialEntries?: InitialEntry[], initialIndex?: number })`](#creatememoryhistory)
- The [`History`](#history) interface
  - [`history.action`](#history.action)
  - [`history.location`](#history.location)
  - [`history.createHref(to: To)`](#history.createhref)
  - [`history.push(to: To, state?: State)`](#history.push)
  - [`history.replace(to: To, state?: State)`](#history.replace)
  - [`history.go(delta: number)`](#history.go)
  - [`history.back()`](#history.back)
  - [`history.forward()`](#history.forward)
  - [`history.listen(listener: Listener)`](#history.listen)
  - [`history.block(blocker: Blocker)`](#history.block)
- The [`Location`](#location) interface
  - [`location.pathname`](#location.pathname)
  - [`location.search`](#location.search)
  - [`location.hash`](#location.hash)
  - [`location.state`](#location.state)<commit_msg>Update API reference intro<commit_after># history API Reference

This is the API reference for [the history JavaScript
library](https://github.com/ReactTraining/history). The source code is
TypeScript, but it is compiled to JavaScript before publishing. The function
signatures in this reference all include their TypeScript type annotations for
conciseness and clarity.

Although there are several APIs in the history library, the main interfaces are:

- The create* methods:
  - [`createBrowserHistory({ window?: Window })`](#createbrowserhistory)
  - [`createHashHistory({ window?: Window })`](#createhashhistory)
  - [`createMemoryHistory({ initialEntries?: InitialEntry[], initialIndex?: number })`](#creatememoryhistory)
- The [`History`](#history) interface
  - [`history.action`](#history.action)
  - [`history.location`](#history.location)
  - [`history.createHref(to: To)`](#history.createhref)
  - [`history.push(to: To, state?: State)`](#history.push)
  - [`history.replace(to: To, state?: State)`](#history.replace)
  - [`history.go(delta: number)`](#history.go)
  - [`history.back()`](#history.back)
  - [`history.forward()`](#history.forward)
  - [`history.listen(listener: Listener)`](#history.listen)
  - [`history.block(blocker: Blocker)`](#history.block)
- The [`Location`](#location) interface
  - [`location.pathname`](#location.pathname)
  - [`location.search`](#location.search)
  - [`location.hash`](#location.hash)
  - [`location.state`](#location.state)
{'fraction_non_alphanumeric': 0.18397085610200364, 'fraction_numerical': 0.0, 'mean_word_length': 5.813895781637717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '730041', 'n_tokens_mistral': 843, 'n_tokens_neox': 794, 'n_words': 179}