|
@@ -55,9 +55,10 @@ or view the documentation of previous major releases:
|
|
- [`DataStoreSerializer`](https://github.com/Sv443-Network/UserUtils#datastoreserializer) - class for importing & exporting data of multiple DataStore instances, including compression, checksumming and running migrations
|
|
- [`DataStoreSerializer`](https://github.com/Sv443-Network/UserUtils#datastoreserializer) - class for importing & exporting data of multiple DataStore instances, including compression, checksumming and running migrations
|
|
- [`Dialog`](https://github.com/Sv443-Network/UserUtils#dialog) - class for creating custom modal dialogs with a promise-based API and a generic, default style
|
|
- [`Dialog`](https://github.com/Sv443-Network/UserUtils#dialog) - class for creating custom modal dialogs with a promise-based API and a generic, default style
|
|
- [`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))
|
|
- [`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))
|
|
|
|
+ - [`Debouncer`](https://github.com/Sv443-Network/UserUtils#debouncer) - class for debouncing function calls with a given timeout
|
|
|
|
+ - [`debounce()`](https://github.com/Sv443-Network/UserUtils#debounce) - function wrapper for the Debouncer class for easier usage
|
|
- [`autoPlural()`](https://github.com/Sv443-Network/UserUtils#autoplural) - automatically pluralize a string
|
|
- [`autoPlural()`](https://github.com/Sv443-Network/UserUtils#autoplural) - automatically pluralize a string
|
|
- [`pauseFor()`](https://github.com/Sv443-Network/UserUtils#pausefor) - pause the execution of a function for a given amount of time
|
|
- [`pauseFor()`](https://github.com/Sv443-Network/UserUtils#pausefor) - pause the execution of a function for a given amount of time
|
|
- - [`debounce()`](https://github.com/Sv443-Network/UserUtils#debounce) - call a function only once in a series of calls, after or before a given timeout
|
|
|
|
- [`fetchAdvanced()`](https://github.com/Sv443-Network/UserUtils#fetchadvanced) - wrapper around the fetch API with a timeout option
|
|
- [`fetchAdvanced()`](https://github.com/Sv443-Network/UserUtils#fetchadvanced) - wrapper around the fetch API with a timeout option
|
|
- [`insertValues()`](https://github.com/Sv443-Network/UserUtils#insertvalues) - insert values into a string at specified placeholders
|
|
- [`insertValues()`](https://github.com/Sv443-Network/UserUtils#insertvalues) - insert values into a string at specified placeholders
|
|
- [`compress()`](https://github.com/Sv443-Network/UserUtils#compress) - compress a string with Gzip or Deflate
|
|
- [`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
|
|
Then import it in your script as usual:
|
|
Then import it in your script as usual:
|
|
|
|
|
|
```ts
|
|
```ts
|
|
|
|
+ // on Node:
|
|
import { addGlobalStyle } from "@sv443-network/userutils";
|
|
import { addGlobalStyle } from "@sv443-network/userutils";
|
|
|
|
|
|
- // or just import everything (not recommended because of worse treeshaking support):
|
|
|
|
|
|
+ // on Deno:
|
|
|
|
+ import { addGlobalStyle } from "jsr:@sv443-network/userutils";
|
|
|
|
|
|
|
|
+ // you can also import the entire library as an object (not recommended because of worse treeshaking support):
|
|
import * as UserUtils from "@sv443-network/userutils";
|
|
import * as UserUtils from "@sv443-network/userutils";
|
|
```
|
|
```
|
|
|
|
|