Releases: Sv443-Network/UserUtils
Releases · Sv443-Network/UserUtils
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.1
v0.4.0
Minor Changes
- 231a79c: Refactored code and documentation and added new functions:
mapRange()
to map a number from one range to the same spot in another rangerandRange()
to generate a random number between a min and max boundaryrandomItem()
to return a random item from an arrayrandomItemIndex()
to return a tuple of a random item and its index from an arraytakeRandomItem()
to return a random item from an array and mutate it to remove the itemrandomizeArray()
to return a copy of the array with its items in a random order
Patch Changes
- 7edf837: decrease npm bundle size
v0.3.0
v0.2.0
v0.1.0
Initial Features:
onSelector()
to call a listener once a selector is found in the DOMautoPlural()
to automatically pluralize a stringclamp()
to clamp a number between a min and max valuepauseFor()
to pause the execution of a function for a given amount of timedebounce()
to call a function only once, after a given amount of timegetUnsafeWindow()
to get the unsafeWindow object or fall back to the regular window objectinsertAfter()
to insert an element as a sibling after another elementaddParent()
to add a parent element around another elementaddGlobalStyle()
to add a global style to the pagepreloadImages()
to preload images into the browser cache for faster loading later onfetchAdvanced()
as a wrapper around the fetch API with a timeout optionopenInNewTab()
to open a link in a new tabinterceptEvent()
to conditionally intercept events registered byaddEventListener()
on any given EventTarget objectinterceptWindowEvent()
to conditionally intercept events registered byaddEventListener()
on the window object