MCPcopy
hub / github.com/duxianwei520/react / onInArray

Method onInArray

app/pages/set/roleManage/roleModuleList.js:221–229  ·  view source on GitHub ↗
(item, arr)

Source from the content-addressed store, hash-verified

219
220 // 判断某元素是否在某数组中
221 onInArray(item, arr) {
222 const array = arr || [];
223 for (let i = 0; i < array.length; i += 1) {
224 if (array[i] === item) {
225 return true;
226 }
227 }
228 return false;
229 }
230
231 // 获取JSON对象长度
232 /* getJSONLength(obj) {

Callers 3

appClass · 0.95
getFatherByIdMethod · 0.95
setNewFatherCheckedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected