Skip to content

Commit e95d835

Browse files
committed
docs: fix stuff
1 parent 422622d commit e95d835

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

README-summary.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ or view the documentation of previous major releases:
5555
- [`DataStoreSerializer`](https://github.com/Sv443-Network/UserUtils#datastoreserializer) - class for importing & exporting data of multiple DataStore instances, including compression, checksumming and running migrations
5656
- [`Dialog`](https://github.com/Sv443-Network/UserUtils#dialog) - class for creating custom modal dialogs with a promise-based API and a generic, default style
5757
- [`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
5860
- [`autoPlural()`](https://github.com/Sv443-Network/UserUtils#autoplural) - automatically pluralize a string
5961
- [`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
6162
- [`fetchAdvanced()`](https://github.com/Sv443-Network/UserUtils#fetchadvanced) - wrapper around the fetch API with a timeout option
6263
- [`insertValues()`](https://github.com/Sv443-Network/UserUtils#insertvalues) - insert values into a string at specified placeholders
6364
- [`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
110111
Then import it in your script as usual:
111112
112113
```ts
114+
// on Node:
113115
import { addGlobalStyle } from "@sv443-network/userutils";
114116
115-
// or just import everything (not recommended because of worse treeshaking support):
117+
// on Deno:
118+
import { addGlobalStyle } from "jsr:@sv443-network/userutils";
116119
120+
// you can also import the entire library as an object (not recommended because of worse treeshaking support):
117121
import * as UserUtils from "@sv443-network/userutils";
118122
```
119123

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,13 @@ Shameless plug: I made a [template for userscripts in TypeScript](https://github
119119
Then import it in your script as usual:
120120

121121
```ts
122+
// on Node:
122123
import { addGlobalStyle } from "@sv443-network/userutils";
123124

124-
// or just import everything (not recommended because of worse treeshaking support):
125+
// on Deno:
126+
import { addGlobalStyle } from "jsr:@sv443-network/userutils";
125127

128+
// you can also import the entire library as an object (not recommended because of worse treeshaking support):
126129
import * as UserUtils from "@sv443-network/userutils";
127130
```
128131

@@ -187,8 +190,10 @@ Shameless plug: I made a [template for userscripts in TypeScript](https://github
187190
This library is written in TypeScript and contains builtin TypeScript declarations.
188191

189192
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.
192197

193198
Some features require the `@run-at` or `@grant` directives to be tweaked in the userscript header or have other specific requirements and limitations.
194199
Those will be listed in a section marked by a warning emoji (⚠️) each.

0 commit comments

Comments
 (0)