Skip to content

Commit 09c941b

Browse files
committed
docs: readme
1 parent 6875f56 commit 09c941b

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

README-summary.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ If you like using this library, please consider [supporting the development ❤
1616
<span style="font-size: 0.8em;">
1717

1818
or view the documentation of previous major releases:
19-
2019
<a href="https://github.com/Sv443-Network/UserUtils/blob/v5.0.1/README.md" rel="noopener noreferrer">5.0.1</a>, <a href="https://github.com/Sv443-Network/UserUtils/blob/v4.2.1/README.md" rel="noopener noreferrer">4.2.1</a>, <a href="https://github.com/Sv443-Network/UserUtils/blob/v3.0.0/README.md" rel="noopener noreferrer">3.0.0</a>, <a href="https://github.com/Sv443-Network/UserUtils/blob/v2.0.1/README.md" rel="noopener noreferrer">2.0.1</a>, <a href="https://github.com/Sv443-Network/UserUtils/blob/v1.2.0/README.md" rel="noopener noreferrer">1.2.0</a>, <a href="https://github.com/Sv443-Network/UserUtils/blob/v0.5.3/README.md" rel="noopener noreferrer">0.5.3</a>
2120
</span>
2221

2322
<br>
2423

2524
<!-- https://github.com/Sv443-Network/UserUtils < #foo -->
2625
## Feature Summary:
27-
- DOM:
26+
- **DOM:**
2827
- [SelectorObserver](https://github.com/Sv443-Network/UserUtils#selectorobserver) - class that manages listeners that are called when selectors are found in the DOM
2928
- [getUnsafeWindow()](https://github.com/Sv443-Network/UserUtils#getunsafewindow) - get the unsafeWindow object or fall back to the regular window object
3029
- [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:
3635
- [isScrollable()](https://github.com/Sv443-Network/UserUtils#isscrollable) - check if an element has a horizontal or vertical scroll bar
3736
- [observeElementProp()](https://github.com/Sv443-Network/UserUtils#observeelementprop) - observe changes to an element's property that can't be observed with MutationObserver
3837
- [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:**
4039
- [clamp()](https://github.com/Sv443-Network/UserUtils#clamp) - constrain a number between a min and max value
4140
- [mapRange()](https://github.com/Sv443-Network/UserUtils#maprange) - map a number from one range to the same spot in another range
4241
- [randRange()](https://github.com/Sv443-Network/UserUtils#randrange) - generate a random number between a min and max boundary
4342
- [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
4645
- [autoPlural()](https://github.com/Sv443-Network/UserUtils#autoplural) - automatically pluralize a string
4746
- [pauseFor()](https://github.com/Sv443-Network/UserUtils#pausefor) - pause the execution of a function for a given amount of time
4847
- [debounce()](https://github.com/Sv443-Network/UserUtils#debounce) - call a function only once in a series of calls, after or before a given timeout
4948
- [fetchAdvanced()](https://github.com/Sv443-Network/UserUtils#fetchadvanced) - wrapper around the fetch API with a timeout option
5049
- [insertValues()](https://github.com/Sv443-Network/UserUtils#insertvalues) - insert values into a string at specified placeholders
5150
- [compress()](https://github.com/Sv443-Network/UserUtils#compress) - compress a string with Gzip or Deflate
5251
- [decompress()](https://github.com/Sv443-Network/UserUtils#decompress) - decompress a previously compressed string
53-
- Arrays:
52+
- **Arrays:**
5453
- [randomItem()](https://github.com/Sv443-Network/UserUtils#randomitem) - returns a random item from an array
5554
- [randomItemIndex()](https://github.com/Sv443-Network/UserUtils#randomitemindex) - returns a tuple of a random item and its index from an array
5655
- [takeRandomItem()](https://github.com/Sv443-Network/UserUtils#takerandomitem) - returns a random item from an array and mutates it to remove the item
5756
- [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:**
5958
- [tr()](https://github.com/Sv443-Network/UserUtils#tr) - simple translation of a string to another language
6059
- [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
6261
- [tr.getLanguage()](https://github.com/Sv443-Network/UserUtils#trgetlanguage) - returns the currently active language
63-
- Utility types for TypeScript
62+
- **Utility types for TypeScript:**
6463
- [Stringifiable](https://github.com/Sv443-Network/UserUtils#stringifiable) - any value that is a string or can be converted to one (implicitly or explicitly)
6564
- [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
6667

6768
<br><br>
6869

@@ -75,7 +76,7 @@ or view the documentation of previous major releases:
7576
```ts
7677
import { addGlobalStyle } from "@sv443-network/userutils";
7778
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):
7980
8081
import * as UserUtils from "@sv443-network/userutils";
8182
```

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ View the documentation of previous major releases:
7979
```ts
8080
import { addGlobalStyle } from "@sv443-network/userutils";
8181

82-
// or just import everything (not recommended because this doesn't allow for treeshaking):
82+
// or just import everything (not recommended because of worse treeshaking support):
8383

8484
import * as UserUtils from "@sv443-network/userutils";
8585
```

0 commit comments

Comments
 (0)