Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 24, 2024 via pnpm

history 5.3.0

Manage session history with JavaScript
Package summary
Share
0
issues
1
license
3
MIT
Package created
29 Apr 2012
Version published
22 Feb 2022
Maintainers
1
Total deps
3
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
@babel/runtime@7.24.4
history@5.3.0
regenerator-runtime@0.14.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of history 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@babel/runtime7.24.4256.05 kBMIT
prod

Visualizations

Frequently Asked Questions

What does history do?

The "history" library is a powerful JavaScript tool that efficaciously manages session history across various environments. It helps developers manage the history stack, navigate, and preserve state between sessions, providing an abstracted, minimal API that removes discrepancies in different environments. History is an invaluable asset for web developers, offering a comprehensive and user-friendly solution to controlling browser history in JavaScript.

How do you use history?

Using the "history" library in JavaScript promises a straightforward and effortless experience for developers. First, you need to install the "history" npm package via your terminal or command line with the following command:

npm install history

After successful installation, you can import the library in your JavaScript file and create a browser history object like so:

import { createBrowserHistory } from 'history'; 
const history = createBrowserHistory();

Once the history object is created, you can use the various methods provided by the package to manage your session history. For instance, to navigate to a different page, you can use the 'push' method:

history.push('/my-new-location')

If you want to navigate back to the previous page, you can use the 'goBack' method:

history.goBack();

Remember, the "history" package offers various methods, and the usage will greatly depend on your project's specific requirements.

Where are the history docs?

All the documentation for the history library can be found in the docs directory at the GitHub repository. For the recent stable release (version 5), which is also, notably, the version used in React Router version 6, you can consult the version 5 documentation.

Users of older versions of the library, particularly React Router versions 4 and 5, should refer to the version 4 documentation. Instructions on how to interact with the library, usage examples, API references, and more can all be found within these comprehensive documentations. The repository also offers a glimpse into the library’s changes and development over the years.