Skip to content

Commit

Permalink
chore: update hono-og
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Feb 12, 2024
1 parent df2dfac commit 3faa7df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@farcaster/core": "^0.13.7",
"@noble/curves": "^1.3.0",
"happy-dom": "^13.3.8",
"hono-og": "~0.0.2",
"hono-og": "~0.0.3",
"immer": "^10.0.3",
"lz-string": "^1.5.0",
"shiki": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/utils/deserializeJson.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { decompressFromEncodedURIComponent } from 'lz-string'
import { default as lz } from 'lz-string'

export function deserializeJson<returnType>(data = ''): returnType {
if (data === 'undefined') return {} as returnType
return JSON.parse(decompressFromEncodedURIComponent(data))
return JSON.parse(lz.decompressFromEncodedURIComponent(data))
}
4 changes: 2 additions & 2 deletions src/utils/serializeJson.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { compressToEncodedURIComponent } from 'lz-string'
import { default as lz } from 'lz-string'

export function serializeJson(data: unknown = {}) {
return compressToEncodedURIComponent(JSON.stringify(data))
return lz.compressToEncodedURIComponent(JSON.stringify(data))
}

0 comments on commit 3faa7df

Please sign in to comment.