MCPcopy
hub / github.com/codedogQBY/ReadAny / createEmptyBookReview

Function createEmptyBookReview

packages/core/src/utils/book-metadata.ts:173–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171}
172
173export function createEmptyBookReview(): BookReview {
174 const now = Date.now();
175 return {
176 id: generateId(),
177 content: "",
178 createdAt: now,
179 updatedAt: now,
180 };
181}
182
183export function normalizeRating(value: unknown): number | undefined {
184 if (typeof value !== "number" || !Number.isFinite(value)) return undefined;

Callers 2

BookDetailsScreenFunction · 0.90
addReviewFunction · 0.90

Calls 1

generateIdFunction · 0.90

Tested by

no test coverage detected