hamzus-ui 0.0.238 → 0.0.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamzus-ui",
3
- "version": "0.0.238",
3
+ "version": "0.0.239",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -3,6 +3,7 @@ export let config = {
3
3
  sessionTokenName: "token", // cookie name where your token is stored
4
4
  requestWithCredentials: false, // whether to include credentials in the request
5
5
  replayAfter401: false, // replay the request after the 401
6
+ addData: null, // function pour ajouter des donnees par defaut au requete
6
7
  }
7
8
 
8
9
  export function init(options = {
@@ -10,11 +11,13 @@ export function init(options = {
10
11
  sessionTokenName : "token",
11
12
  requestWithCredentials : false,
12
13
  on401:null,
13
- replayAfter401:false
14
+ replayAfter401:false,
15
+ addData:null,
14
16
  }) {
15
17
  config.url = options.url || "http://localhost:8000";
16
18
  config.sessionTokenName = options.sessionTokenName || "token";
17
19
  config.requestWithCredentials = options.requestWithCredentials || false;
18
20
  config.on401 = options.on401 || null;
19
21
  config.replayAfter401 = options.replayAfter401 || false;
22
+ config.addData = options.addData || false;
20
23
  }