MCPcopy Create free account
hub / github.com/Serverless-Devs/Serverless-Devs / formatResult

Function formatResult

src/command/registry/command/list.ts:17–25  ·  view source on GitHub ↗
(result: Array<object>)

Source from the content-addressed store, hash-verified

15const wantedInfoKeys = ['type', 'name', 'description', 'category', 'tags'];
16
17function formatResult(result: Array<object>): Array<any> {
18 const formattedResult = result.map(result => {
19 const tmp = pick(result, wantedInfoKeys);
20 set(tmp, 'category', get(tmp, 'category.name'));
21 return tmp;
22 });
23
24 return formattedResult;
25}
26
27export default (program: Command) => {
28 program

Callers 1

list.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected