Skip to content

A small utility lib for working with the "hashchange" event and "window.location.hash". Makes it easy to define actions that happen when the user "enters" or "exits" specific URL fragments on the page. 887 bytes minified gzipped!

License

Notifications You must be signed in to change notification settings

Haprog/hash-actions

Repository files navigation

Node.js CI

hash-actions

A utility for working with the hashchange event and window.location.hash.

Development

Install dev dependencies

npm install

Lint

npm run lint

Build library

Builds the library from sources at ./src/ into ./lib/.

npm run build

Build docs

Generate documentation with jsdoc into ./docs/out.

npm run build-docs

Run docs

Generate and run docs. This will start an http-server which will serve the docs from ./docs/out at http://localhost:8080.

npm run docs

Run tests

Runs tests with headless Chrome.

npm test

Run/debug tests manually

Runs tests with headless Chrome and leaves the server running so you can manually run the tests in any browser by navigating to http://localhost:9876/debug.html

npm run test:watch

Check file sizes

Print file sizes (source, minified, gzipped, minified gzipped etc.)

./print-file-sizes.sh

About

A small utility lib for working with the "hashchange" event and "window.location.hash". Makes it easy to define actions that happen when the user "enters" or "exits" specific URL fragments on the page. 887 bytes minified gzipped!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published