Appearance
@longmo-utils/common / unique
function unique<T>(arr): T[];
移除数组中的重复值
T
arr
T[]
去除重复值后的新数组
unique([1, 2, 2, 3, 3, 3]) // [1, 2, 3] unique(['a', 'b', 'a', 'c']) // ['a', 'b', 'c']