MCPcopy Create free account
hub / github.com/TanStack/db / serializeComment

Function serializeComment

packages/trailbase-db-collection/e2e/trailbase.e2e.test.ts:148–152  ·  view source on GitHub ↗
(comment: Comment)

Source from the content-addressed store, hash-verified

146})
147
148const serializeComment = (comment: Comment): CommentRecord => ({
149 ...comment,
150 createdAt: comment.createdAt.toISOString(),
151 deletedAt: comment.deletedAt ? comment.deletedAt.toISOString() : null,
152})
153
154/**
155 * Helper to create a set of collections for a given sync mode

Callers 1

setupInitialDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected