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

Function checkNameIsExistInArray

common/postmanLib.js:157–167  ·  view source on GitHub ↗
(name, arr)

Source from the content-addressed store, hash-verified

155}
156
157function checkNameIsExistInArray(name, arr) {
158 let isRepeat = false;
159 for (let i = 0; i < arr.length; i++) {
160 let item = arr[i];
161 if (item.name === name) {
162 isRepeat = true;
163 break;
164 }
165 }
166 return isRepeat;
167}
168
169function handleCurrDomain(domains, case_env) {
170 let currDomain = _.find(domains, item => item.name === case_env);

Callers 2

Postman.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected