[MISC] Formatting

This commit is contained in:
Peter Pfeufer 2025-08-08 19:33:12 +02:00
parent 0028310aa5
commit 4cc108ab7f
No known key found for this signature in database

View File

@ -9,7 +9,7 @@ The JS file is already loaded in the base template, so it is globally available.
The following functions are available in the JavaScript framework:
### `isArray()`
### isArray()
Checks if the given value is an array.
@ -25,7 +25,7 @@ if (isArray(someVariable)) {
}
```
### `isObject()`
### isObject()
Checks if the given value is an object.
@ -41,7 +41,7 @@ if (isObject(someVariable)) {
}
```
### `fetchGet()`
### fetchGet()
Performs a GET request to the given URL and returns a Promise that resolves with the response data.
@ -62,13 +62,13 @@ fetchGet({
});
```
#### `fetchGet()` Parameters
#### fetchGet() Parameters
- `url`: The URL to fetch data from.
- `payload`: Optional data to send with the request. Can be an object or a string.
- `responseIsJson`: Optional boolean indicating if the response should be parsed as JSON (default is `true`).
### `fetchPost()`
### fetchPost()
Performs a POST request to the given URL with the provided data and returns a Promise that resolves with the response data.
@ -94,7 +94,7 @@ fetchPost({
});
```
#### `fetchPost()` Parameters
#### fetchPost() Parameters
- `url`: The URL to send the POST request to.
- `csrfToken`: The CSRF token to include in the request headers.