MCPcopy Create free account
hub / github.com/pacexy/flow / deserializeData

Function deserializeData

apps/reader/src/sync.ts:57–68  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

55}
56
57function deserializeData(text: string) {
58 const { version, dbVersion, books } = JSON.parse(text) as SerializedBooks
59
60 if (version < VERSION) {
61 // migrate `data.json`
62 }
63 if (db && dbVersion < db.verno) {
64 // migrate `BookRecord`
65 }
66
67 return books
68}
69
70export async function uploadData(books: BookRecord[]) {
71 return dbx.filesUpload({

Callers 2

dropboxBooksFetcherFunction · 0.85
unpackFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected