An open API service indexing awesome lists of open source software.

https://github.com/icelk/js-utils

Javascript utility functions
https://github.com/icelk/js-utils

Last synced: about 1 year ago
JSON representation

Javascript utility functions

Awesome Lists containing this project

README

          

# JS utils

This is a small collection of Javascript functions I occasionally use.

Some [functions](#functions) are available in both old JS style (HTML script tag to include code),
ES modules (`import throttle from "./throttle.mjs"`) and typescript.

# License

This is licensed under CC0 - everything's under public domain.

# Functions

## [throttle.js](throttle.js)

This limits the callback of events to a user-specified duration.

Useful for making API calls from user key presses.

## [anchor.js](anchor.js)

Enables smooth scrolling when clicking on anchor links.
Also highlights the anchor, both on click and on page load, when the fragment part of the URI is a anchor on the page.

## [headerLink.js](headerLink.js)

Adds buttons to headers to get a link to the page & anchor.