MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / reducer

Function reducer

apps/site/reducers/releaseReducer.ts:32–50  ·  view source on GitHub ↗
(
  state: Types.ReleaseState,
  action: Types.ReleaseAction
)

Source from the content-addressed store, hash-verified

30});
31
32const reducer = (
33 state: Types.ReleaseState,
34 action: Types.ReleaseAction
35): Types.ReleaseState => {
36 switch (action.type) {
37 case 'SET_VERSION':
38 return { ...state, version: action.payload };
39 case 'SET_OS':
40 return { ...state, os: action.payload };
41 case 'SET_PLATFORM':
42 return { ...state, platform: action.payload };
43 case 'SET_INSTALL_METHOD':
44 return { ...state, installMethod: action.payload };
45 case 'SET_MANAGER':
46 return { ...state, packageManager: action.payload };
47 default:
48 return state;
49 }
50};
51
52export default reducer;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected