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

Method removeFromArray

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

Source from the content-addressed store, hash-verified

208
209 // 从某数组删除某元素
210 removeFromArray(item, arr) {
211 const array = arr;
212 for (let i = 0; i < array.length; i += 1) {
213 if (array[i] === item) {
214 array.splice(i, 1);
215 return array;
216 }
217 }
218 }
219
220 // 判断某元素是否在某数组中
221 onInArray(item, arr) {

Callers 2

appClass · 0.95
getFatherByIdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected