Releases: Sv443-Network/UserUtils
v4.1.0
v4.0.0
Major Changes
- dae5450: Removed
amplifyMediafunction due to massive inconsistencies in sound quality
Minor Changes
- 168c2aa: Added functions
compressanddecompressto compress and decompress strings using gzip or deflate - 49bc85e: Added utility types
NonEmptyStringandLooseUnion
Patch Changes
- 2ae665d: fixed wrong TS type for SelectorObserver options in constructor
v3.0.0
Major Changes
-
1859022:
onSelector()has been turned into theSelectorObserverclass to reduce the performance impact on larger sites:- its instances can be scoped to any element lower in the DOM tree, unlike before where it was always observing the entire body with all its children
- separate instances can be disabled and reenabled individually on demand
- separate instances can have different MutationObserver options set to further reduce performance impact
- the separation into instances allows for a new "chaining" paradigm where selector listeners are only added and checked for once they are actually needed (see examples in the documentation)
- when using chaining, separate instances can be created and have listeners added to them before their base element is available in the DOM tree
- every listener can have a set debounce time, so that it doesn't get called too often (works the same as the
debounce()function, but is disabled by default) - there are now multiple methods to get and delete specific listeners
The
SelectorObserver.addListener()method is backwards compatible with the oldonSelector()function, so you can just add the class instance in front (for full backwards compat usedocument.bodyfor thebaseElementparameter of the constructor), then change the old function's name and it should work as before.
For more info and examples, please view the SelectorObserver documentation
Minor Changes
-
0db73b5: Removed the limiter (DynamicsCompressorNode) from
amplifyMedia()for clear and undistorted audio.Notable changes:
- The property
sourcehas been renamed tosourceNodeto fit the naming of thegainNodeproperty - A boolean property
enabledhas been added to check if the amplification is enabled or not - The parameter
initialMultiplierhas been renamed toinitialGainto reduce confusion (it is not a multiplier strictly speaking)
- The property
-
736784f: Added function
randomId()to randomly generate cryptographically strong hexadecimal IDs -
563e515: Added utility type
NonEmptyArrayfor typing an array with at least 1 item
Patch Changes
- a123da6: Added
@linkcodereferences to the JSDoc in-IDE documentation
v2.0.1
v2.0.0
Major Changes
- b53a946: Added compression to
amplifyMedia()to prevent audio clipping and distortion and modified return type accordingly:- Renamed:
amplify()tosetGain()andgetAmpLevel()togetGain() - Added properties:
enable(),disable(),setLimiterOptions()andlimiterNode - Other changes: Amplification is no longer enabled automatically,
enable()must now be called manually after initializing
- Renamed: