duckylib 0.1.13 → 0.1.15

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/dist/index.d.ts CHANGED
@@ -39,4 +39,4 @@ export declare function getAgeVerified(): boolean
39
39
 
40
40
  export declare function getUserData(): Auth.User | null
41
41
 
42
- export declare function setUserData(user: Auth.User): void
42
+ export declare function setUserData(user: Auth.User | null): void
package/dist/index.js CHANGED
@@ -59,7 +59,7 @@ export function getUserData() {
59
59
  if (browser) {
60
60
  if (window.localStorage.getItem("userData") !== null) {
61
61
  let it = window.localStorage.getItem("userData");
62
- if (!it) {
62
+ if (!it || it === "null") {
63
63
  window.localStorage.setItem("userData", "null");
64
64
  return null;
65
65
  }
@@ -78,5 +78,5 @@ export function getUserData() {
78
78
  export function setUserData(user) {
79
79
  console.log("SET USER DATA", user);
80
80
  if (window !== undefined)
81
- window.localStorage.setItem("userData", JSON.stringify(user) || "null");
81
+ window.localStorage.setItem("userData", user !== null ? JSON.stringify(user) : "null");
82
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "duckylib",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -10,6 +10,10 @@
10
10
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11
11
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
12
12
  },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/duckyyylol/DuckyLib.git"
16
+ },
13
17
  "files": [
14
18
  "dist",
15
19
  "!dist/**/*.test.*",