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

Function firstValue

packages/shared/src/features/patchy/patchyContext.ts:17–18  ·  view source on GitHub ↗
(value: string | string[] | undefined)

Source from the content-addressed store, hash-verified

15const FEED_PATHS = ['/popular', '/upvoted', '/posts', '/following', '/feeds'];
16
17const firstValue = (value: string | string[] | undefined): string | undefined =>
18 Array.isArray(value) ? value[0] : value;
19
20interface PatchyContextInput {
21 // The route path without the query, e.g. /tags/rust.

Callers 1

getPatchyContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected