@the-libs/base-shared
Advanced tools
Comparing version 1.1.49 to 1.1.50
@@ -57,7 +57,6 @@ // libs/base-shared/src/exceptions/base.ts | ||
var guessValueType = (item) => typeof item === "boolean" || item === void 0 ? item ? "Yes" : "No" : typeof item === "string" ? doesLooksLikeDate(item) && !isNaN(Date.parse(item)) && new Date(item).getFullYear() !== 2001 ? new Date(item).toString() : formatTextNicely(item) : item instanceof Date ? item.toLocaleDateString() : typeof item === "object" && item !== null ? JSON.stringify(item) : formatTextNicely(String(item)); | ||
var handleSubscribeClick = (cb) => { | ||
var handleSubscribeClick = (pubkey, cb) => { | ||
navigator.serviceWorker.ready.then((registration) => { | ||
const base64String = "BH1R9v3i49K6RwINhRAIGDWeD5Qc4P8goayR9Zse5GHr8P6TftjYECx98M-C7YBpA-DPbnM_k_QdZgQc5QnWgU8"; | ||
const padding = "=".repeat((4 - base64String?.length % 4) % 4); | ||
const base64 = (base64String + padding).replace(/-/g, "+").replace(/_/g, "/"); | ||
const padding = "=".repeat((4 - pubkey?.length % 4) % 4); | ||
const base64 = (pubkey + padding).replace(/-/g, "+").replace(/_/g, "/"); | ||
const rawData = window.atob(base64); | ||
@@ -64,0 +63,0 @@ const outputArray = new Uint8Array(rawData?.length); |
{ | ||
"name": "@the-libs/base-shared", | ||
"version": "1.1.49", | ||
"version": "1.1.50", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -7,3 +7,3 @@ export * from './format-text'; | ||
export declare const guessValueType: (item: TODO) => string; | ||
export declare const handleSubscribeClick: (cb: (pushSubscription: TODO) => void) => void; | ||
export declare const handleSubscribeClick: (pubkey: string, cb: (pushSubscription: TODO) => void) => void; | ||
//# sourceMappingURL=index.d.ts.map |
Sorry, the diff of this file is not supported yet
8526
139