UNPKG
d3-jsnext
Version:
latest (3.5.5)
3.5.5
d3, but futuristic
github.com/rollup/d3-jsnext
rollup/d3-jsnext
d3-jsnext
/
generate
/
src
/
utils
/
dedupe.js
13 lines
(10 loc)
•
196 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
export
default
function
dedupe
(
arr
) {
let
i = arr.
length
;
while
( i-- ) {
const
index = arr.
indexOf
( arr[i] );
if
( ~index && index < i ) { arr.
splice
( i,
1
); } }
return
arr; }