history-extradeprecated

Extra functionality for the history module

Usage no npm install needed!

<script type="module">
  import historyExtra from 'https://cdn.skypack.dev/history-extra';
</script>

README

history-extra

Extra functionality for the history module.

Build Status GitHub license Coverage npm Project Status

Usage

yarn add history history-extra

history is a peer dependency, and must be installed along side history-extra.

Versions

The version of the history module you're using will determine which version of history-extra you should use. See the table below to find the version you need.

history history-extra
4.7.x 4.x
4.8.0+ 5.x

Methods

createHashStateHistory

import { createHashStateHistory } from 'history-extra';

Works the same way that createHashHistory in history works, except that it supports browser history and pushState.

Development

Scripts

There are several scripts available to check and test the code. The CI will run them too, but they're also helpful for running locally. All of these are launched with npm run <script> or yarn run <script>.

script description
lint Runs linter on the code to catch syntax and other issues.
build Runs the build, producing the output in dist.
test Runs the tests in a local browser (Chrome and Firefox).

Environment Variables

There are some ENV args that make things nice for development.

arg description
DEV Boolean, useful for tests. Puts karma in watch mode and will re-run tests every time you save a change.
TRAVIS Boolean, used by the CI. Also useful for running your tests on Sauce Labs instead of just locally.
KARMA_LAUNCHERS Useful for controlling which launchers to use, as a comma-separated list. Local options are Chrome and Firefox. If TRAVIS is truthy, options are SL_Explorer, SL_Chrome, SL_Firefox, and SL_Safari.

Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs

Testing Provided by Sauce Labs

License

MIT © w33ble