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
Copy file name to clipboardexpand all lines: README-summary.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -55,9 +55,10 @@ or view the documentation of previous major releases:
55
55
-[`DataStoreSerializer`](https://github.com/Sv443-Network/UserUtils#datastoreserializer) - class for importing & exporting data of multiple DataStore instances, including compression, checksumming and running migrations
56
56
-[`Dialog`](https://github.com/Sv443-Network/UserUtils#dialog) - class for creating custom modal dialogs with a promise-based API and a generic, default style
57
57
-[`NanoEmitter`](https://github.com/Sv443-Network/UserUtils#nanoemitter) - tiny event emitter class with a focus on performance and simplicity (based on [nanoevents](https://npmjs.com/package/nanoevents))
58
+
-[`Debouncer`](https://github.com/Sv443-Network/UserUtils#debouncer) - class for debouncing function calls with a given timeout
59
+
-[`debounce()`](https://github.com/Sv443-Network/UserUtils#debounce) - function wrapper for the Debouncer class for easier usage
58
60
-[`autoPlural()`](https://github.com/Sv443-Network/UserUtils#autoplural) - automatically pluralize a string
59
61
-[`pauseFor()`](https://github.com/Sv443-Network/UserUtils#pausefor) - pause the execution of a function for a given amount of time
60
-
-[`debounce()`](https://github.com/Sv443-Network/UserUtils#debounce) - call a function only once in a series of calls, after or before a given timeout
61
62
-[`fetchAdvanced()`](https://github.com/Sv443-Network/UserUtils#fetchadvanced) - wrapper around the fetch API with a timeout option
62
63
-[`insertValues()`](https://github.com/Sv443-Network/UserUtils#insertvalues) - insert values into a string at specified placeholders
63
64
-[`compress()`](https://github.com/Sv443-Network/UserUtils#compress) - compress a string with Gzip or Deflate
@@ -110,10 +111,13 @@ Shameless plug: I made a [template for userscripts in TypeScript](https://github
110
111
Then import it in your script as usual:
111
112
112
113
```ts
114
+
// on Node:
113
115
import { addGlobalStyle } from "@sv443-network/userutils";
114
116
115
-
// or just import everything (not recommended because of worse treeshaking support):
117
+
// on Deno:
118
+
import { addGlobalStyle } from "jsr:@sv443-network/userutils";
116
119
120
+
// you can also import the entire library as an object (not recommended because of worse treeshaking support):
117
121
import * as UserUtils from "@sv443-network/userutils";
// you can also import the entire library as an object (not recommended because of worse treeshaking support):
126
129
import*asUserUtilsfrom"@sv443-network/userutils";
127
130
```
128
131
@@ -187,8 +190,10 @@ Shameless plug: I made a [template for userscripts in TypeScript](https://github
187
190
This library is written in TypeScript and contains builtin TypeScript declarations.
188
191
189
192
Each feature has example code that can be expanded by clicking on the text "Example - click to view".
190
-
The usages and examples are written in TypeScript and use ESM import syntax, but the library can also be used in plain JavaScript after removing the type annotations (and changing the imports if you are using CommonJS or the global declaration).
191
-
If the usage section contains multiple usages of the function, each occurrence represents an overload and you can choose which one you want to use.
193
+
The signatures and examples are written in TypeScript and use ESM import syntax, but the library can also be used in plain JavaScript after removing the type annotations (and changing the imports if you are using CommonJS or the global declaration).
194
+
195
+
If the signature section contains multiple signatures of the function, each occurrence represents an overload and you can choose which one you want to use.
196
+
They will also be further explained in the description below that section.
192
197
193
198
Some features require the `@run-at` or `@grant` directives to be tweaked in the userscript header or have other specific requirements and limitations.
194
199
Those will be listed in a section marked by a warning emoji (⚠️) each.
0 commit comments