sliftutils 1.1.40 → 1.1.41
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/index.d.ts +1 -0
- package/misc/getSecret.d.ts +1 -0
- package/misc/getSecret.ts +7 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/misc/getSecret.d.ts
CHANGED
package/misc/getSecret.ts
CHANGED
|
@@ -96,3 +96,10 @@ export const getSecret = cache(async function getSecret(key: string): Promise<st
|
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
});
|
|
99
|
+
|
|
100
|
+
export function setSecret(key: string, value: string) {
|
|
101
|
+
if (isNode()) {
|
|
102
|
+
throw new Error("setSecret is only supported in the browser. We don't want to break the user's file system with setSecret in NodeJS.");
|
|
103
|
+
}
|
|
104
|
+
localStorage.setItem(getStorageKey(key), value);
|
|
105
|
+
}
|