54e7905
: Features:
amplifyMedia()
to boost the volume of a MediaElement past its default maximumMutationObserver.observe()
options to be passed to initOnSelector()
Fixes:
onSelector()
not triggering correctly85ec87b
: fix missing export for array functions231a79c
: 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 order7edf837
: decrease npm bundle size07ec443
: add getSelectorMap()
to return all currently registered selectors0cf2254
: add onSelector()
to call a listener once a selector is found in the DOMbb60db0
: minor fixes9206f6e
: Initial release - 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 by addEventListener()
on any given EventTarget objectinterceptWindowEvent()
to conditionally intercept events registered by addEventListener()
on the window object