JavaScript
I put together a collection of JavaScript stuff I use. Hope you find them useful!
Installation
Use this:
npm install @zellwk/javascript
Then import whatever utilities you need.
List of everything
-
Browsers only
- After Polyfill
- Before Polyfill
- focusable - Finds focusable elements
- font size - Utilities to get values of
1rem
and1em
- getSiblingElements - Get sibling elements
- getTranslateValues - Get 2d and 3d CSS Translate values
- normaliseButton - resolves button inconsistencies
- setConnectionStatus - Updates HTML when connection status changes
- store
- tab - Helpers for normal Tab key vs Shift + Tab
- trapFocus - traps focus
-
Everywhere
- Convert Case - helpers for case conversion
- generateUniqueString - Generates a unique string
- mix - Merges objects (including accessors)
- shuffle - shuffles and array
- wait - Delay before resolving a promise
WIP Warning
This repository is always a Work in Progress. I may change anything anytime!
Changelog
Detailed changes for each release are documented in the release notes.