MCPcopy Index your code
hub / github.com/plotly/plotly.js / unique_eq

Function unique_eq

stackgl_modules/index.js:38871–38888  ·  view source on GitHub ↗
(list)

Source from the content-addressed store, hash-verified

38869}
38870
38871function unique_eq(list) {
38872 var ptr = 1
38873 , len = list.length
38874 , a=list[0], b = list[0]
38875 for(var i=1; i<len; ++i, b=a) {
38876 b = a
38877 a = list[i]
38878 if(a !== b) {
38879 if(i === ptr) {
38880 ptr++
38881 continue
38882 }
38883 list[ptr++] = a
38884 }
38885 }
38886 list.length = ptr
38887 return list
38888}
38889
38890function unique(list, compare, sorted) {
38891 if(list.length === 0) {

Callers 1

uniqueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…