MCPcopy
hub / github.com/bendc/sprint / removeDuplicates

Function removeDuplicates

sprint.js:335–355  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

333 }())
334
335 var removeDuplicates = function(arr) {
336 var clean = []
337 var cleanLen = 0
338 var arrLen = arr.length
339
340 for (var i = 0; i < arrLen; i++) {
341 var el = arr[i]
342 var duplicate = false
343
344 for (var j = 0; j < cleanLen; j++) {
345 if (el !== clean[j]) continue
346 duplicate = true
347 break
348 }
349
350 if (duplicate) continue
351 clean[cleanLen++] = el
352 }
353
354 return clean
355 }
356
357 var removeEvent = (function() {
358 var isHandlerShared = function(el, event, registeredHandler) {

Callers 3

findAncestorsFunction · 0.85
selectAdjacentSiblingsFunction · 0.85
sprint.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected