import { unique } from "https://dotland.deno.dev/x/jssm@5.104.1/jssm_util.d.ts";
Reduces an array to its unique contents. Compares with ===
and makes no
effort to deep-compare contents; two matching arrays or objects contained
will be treated as distinct, according to javascript rules. This also means
that NaNs
will be dropped, because they do not self-compare.
unique( [] ); // []
unique( [0,0] ); // [0]
unique( [0,1,2, 0,1,2, 0,1,2] ); // [0,1,2]
unique( [ [1], [1] ] ); // [ [1], [1] ] because arrays don't match
unique( [0,NaN,2] ); // [0,2]