You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[SelectorObserver](https://github.com/Sv443-Network/UserUtils#selectorobserver) - class that manages listeners that are called when selectors are found in the DOM
29
28
-[getUnsafeWindow()](https://github.com/Sv443-Network/UserUtils#getunsafewindow) - get the unsafeWindow object or fall back to the regular window object
30
29
-[addParent()](https://github.com/Sv443-Network/UserUtils#addparent) - add a parent element around another element
@@ -36,33 +35,35 @@ or view the documentation of previous major releases:
36
35
-[isScrollable()](https://github.com/Sv443-Network/UserUtils#isscrollable) - check if an element has a horizontal or vertical scroll bar
37
36
-[observeElementProp()](https://github.com/Sv443-Network/UserUtils#observeelementprop) - observe changes to an element's property that can't be observed with MutationObserver
38
37
-[getSiblingsFrame()](https://github.com/Sv443-Network/UserUtils#getsiblingsframe) - returns a frame of an element's siblings, with a given alignment and size
39
-
- Math:
38
+
-**Math:**
40
39
-[clamp()](https://github.com/Sv443-Network/UserUtils#clamp) - constrain a number between a min and max value
41
40
-[mapRange()](https://github.com/Sv443-Network/UserUtils#maprange) - map a number from one range to the same spot in another range
42
41
-[randRange()](https://github.com/Sv443-Network/UserUtils#randrange) - generate a random number between a min and max boundary
43
42
-[randomId()](https://github.com/Sv443-Network/UserUtils#randomid) - generate a random ID of a given length and radix
44
-
- Misc:
45
-
-[DataStore](https://github.com/Sv443-Network/UserUtils#DataStore) - class that manages a sync & async persistent JSON database, including data migration
43
+
-**Misc:**
44
+
-[DataStore](https://github.com/Sv443-Network/UserUtils#datastore) - class that manages a sync & async persistent JSON database, including data migration
46
45
-[autoPlural()](https://github.com/Sv443-Network/UserUtils#autoplural) - automatically pluralize a string
47
46
-[pauseFor()](https://github.com/Sv443-Network/UserUtils#pausefor) - pause the execution of a function for a given amount of time
48
47
-[debounce()](https://github.com/Sv443-Network/UserUtils#debounce) - call a function only once in a series of calls, after or before a given timeout
49
48
-[fetchAdvanced()](https://github.com/Sv443-Network/UserUtils#fetchadvanced) - wrapper around the fetch API with a timeout option
50
49
-[insertValues()](https://github.com/Sv443-Network/UserUtils#insertvalues) - insert values into a string at specified placeholders
51
50
-[compress()](https://github.com/Sv443-Network/UserUtils#compress) - compress a string with Gzip or Deflate
52
51
-[decompress()](https://github.com/Sv443-Network/UserUtils#decompress) - decompress a previously compressed string
53
-
- Arrays:
52
+
-**Arrays:**
54
53
-[randomItem()](https://github.com/Sv443-Network/UserUtils#randomitem) - returns a random item from an array
55
54
-[randomItemIndex()](https://github.com/Sv443-Network/UserUtils#randomitemindex) - returns a tuple of a random item and its index from an array
56
55
-[takeRandomItem()](https://github.com/Sv443-Network/UserUtils#takerandomitem) - returns a random item from an array and mutates it to remove the item
57
56
-[randomizeArray()](https://github.com/Sv443-Network/UserUtils#randomizearray) - returns a copy of the array with its items in a random order
58
-
- Translation:
57
+
-**Translation:**
59
58
-[tr()](https://github.com/Sv443-Network/UserUtils#tr) - simple translation of a string to another language
60
59
-[tr.addLanguage()](https://github.com/Sv443-Network/UserUtils#traddlanguage) - add a language and its translations
61
-
-[tr.setLanguage()](https://github.com/Sv443-Network/UserUtils#trsetlanguage) - set the currently active language
60
+
-[tr.setLanguage()](https://github.com/Sv443-Network/UserUtils#trsetlanguage) - set the currently active language for translations
62
61
-[tr.getLanguage()](https://github.com/Sv443-Network/UserUtils#trgetlanguage) - returns the currently active language
63
-
- Utility types for TypeScript
62
+
-**Utility types for TypeScript:**
64
63
-[Stringifiable](https://github.com/Sv443-Network/UserUtils#stringifiable) - any value that is a string or can be converted to one (implicitly or explicitly)
65
64
-[NonEmptyArray](https://github.com/Sv443-Network/UserUtils#nonemptyarray) - any array that should have at least one item
65
+
-[NonEmptyString](https://github.com/Sv443-Network/UserUtils#nonemptystring) - any string that should have at least one character
66
+
-[LooseUnion](https://github.com/Sv443-Network/UserUtils#looseunion) - a union that gives autocomplete in the IDE but also allows any other value of the same type
66
67
67
68
<br><br>
68
69
@@ -75,7 +76,7 @@ or view the documentation of previous major releases:
75
76
```ts
76
77
import { addGlobalStyle } from "@sv443-network/userutils";
77
78
78
-
// or just import everything (not recommended because this doesn't allow for treeshaking):
79
+
// or just import everything (not recommended because of worse treeshaking support):
79
80
80
81
import * as UserUtils from "@sv443-network/userutils";
0 commit comments