MCPcopy
hub / github.com/YMFE/yapi / handleParams

Function handleParams

common/diff-view.js:46–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 };
45
46 const handleParams = item => {
47 let newItem = Object.assign({}, item);
48 newItem._id = undefined;
49
50 Object.keys(newItem).forEach(key => {
51 switch (key) {
52 case 'required':
53 newItem[key] = valueMaps[newItem[key]];
54 break;
55 case 'type':
56 newItem[key] = valueMaps[newItem[key]];
57 break;
58 }
59 });
60 return newItem;
61 };
62
63 const diffArray = (arr1, arr2) => {
64 arr1 = arr1 || [];

Callers 3

commons.test.jsFile · 0.90
Postman.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected