MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / setClientContext

Function setClientContext

apps/site/client-context.ts:18–26  ·  view source on GitHub ↗
(data: Partial<ClientSharedServerContext>)

Source from the content-addressed store, hash-verified

16// This is used by the dynamic router to define on the request
17// the current set of information we use (shared)
18export const setClientContext = (data: Partial<ClientSharedServerContext>) => {
19 const _data = assignClientContext(data);
20
21 getClientContext().frontmatter = _data.frontmatter;
22 getClientContext().pathname = _data.pathname;
23 getClientContext().headings = _data.headings;
24 getClientContext().readingTime = _data.readingTime;
25 getClientContext().filename = _data.filename;
26};

Callers 1

renderPageFunction · 0.90

Calls 1

assignClientContextFunction · 0.90

Tested by

no test coverage detected