MCPcopy Create free account
hub / github.com/dailydotdev/apps / isPostLike

Function isPostLike

packages/shared/src/features/patchy/patchyAssistant.ts:210–220  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

208export type PatchyQuickRead = Post;
209
210const isPostLike = (value: unknown): value is Post & { readTime: number } => {
211 const post = value as Post;
212 return (
213 !!post &&
214 typeof post === 'object' &&
215 typeof post.id === 'string' &&
216 typeof post.title === 'string' &&
217 typeof post.commentsPermalink === 'string' &&
218 typeof post.readTime === 'number'
219 );
220};
221
222// The feeds he picks from: yours, explore, tags, sources and bookmarks. Not
223// search, squads, other people's profiles or related posts.

Callers 1

visitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected