Skip to content

Releases: Sv443-Network/UserUtils

v0.5.3

14 Aug 10:35
6c5bfff
Compare
Choose a tag to compare

Patch Changes

v0.5.2

12 Aug 22:16
4c056d8
Compare
Choose a tag to compare

Patch Changes

v0.5.1

12 Aug 21:28
2a4f4b8
Compare
Choose a tag to compare

Patch Changes

v0.5.0

12 Aug 20:37
fe2db89
Compare
Choose a tag to compare

Minor Changes

  • 54e7905: Features:

    • add function amplifyMedia() to boost the volume of a MediaElement past its default maximum
    • allow all MutationObserver.observe() options to be passed to initOnSelector()

    Fixes:

    • fix onSelector() not triggering correctly

v0.4.1

08 Aug 23:20
4f5d246
Compare
Choose a tag to compare

Patch Changes

  • 85ec87b: fix missing export for array functions

v0.4.0

08 Aug 23:07
fc60dfb
Compare
Choose a tag to compare

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 range
    • randRange() to generate a random number between a min and max boundary
    • randomItem() to return a random item from an array
    • randomItemIndex() to return a tuple of a random item and its index from an array
    • takeRandomItem() to return a random item from an array and mutate it to remove the item
    • randomizeArray() to return a copy of the array with its items in a random order

Patch Changes

  • 7edf837: decrease npm bundle size

v0.3.0

08 Aug 17:05
e43c944
Compare
Choose a tag to compare

Minor Changes

  • 07ec443: add getSelectorMap() to return all currently registered selectors

v0.2.0

03 Aug 21:25
f963e99
Compare
Choose a tag to compare

Minor Changes

  • 0cf2254: add onSelector() to call a listener once a selector is found in the DOM

v0.1.0

03 Aug 14:50
90fdaa9
Compare
Choose a tag to compare

Initial Features:

  • onSelector() to call a listener once a selector is found in the DOM
  • autoPlural() to automatically pluralize a string
  • clamp() to clamp a number between a min and max value
  • pauseFor() to pause the execution of a function for a given amount of time
  • debounce() to call a function only once, after a given amount of time
  • getUnsafeWindow() to get the unsafeWindow object or fall back to the regular window object
  • insertAfter() to insert an element as a sibling after another element
  • addParent() to add a parent element around another element
  • addGlobalStyle() to add a global style to the page
  • preloadImages() to preload images into the browser cache for faster loading later on
  • fetchAdvanced() as a wrapper around the fetch API with a timeout option
  • openInNewTab() to open a link in a new tab
  • interceptEvent() to conditionally intercept events registered by addEventListener() on any given EventTarget object
  • interceptWindowEvent() to conditionally intercept events registered by addEventListener() on the window object