@the-libs/base-shared
Advanced tools
Comparing version 1.2.19 to 1.2.21
10
index.js
@@ -74,2 +74,9 @@ // libs/base-shared/src/exceptions/base.ts | ||
}; | ||
var stringifyIfNeeded = (o) => { | ||
try { | ||
return String(o) === "[object Object]" ? JSON.stringify(o) : o; | ||
} catch { | ||
return "stringification is needed but not possible"; | ||
} | ||
}; | ||
export { | ||
@@ -85,3 +92,4 @@ ClientError, | ||
handleSubscribeClick, | ||
parseJSONWithType | ||
parseJSONWithType, | ||
stringifyIfNeeded | ||
}; |
{ | ||
"name": "@the-libs/base-shared", | ||
"version": "1.2.19", | ||
"version": "1.2.21", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -8,2 +8,3 @@ export * from './format-text'; | ||
export declare const handleSubscribeClick: (pubkey: string, cb: (pushSubscription: TODO) => void) => void; | ||
export declare const stringifyIfNeeded: (o: TODO) => any; | ||
//# sourceMappingURL=index.d.ts.map |
Sorry, the diff of this file is not supported yet
8834
148