array-mumu 0.2.0-rc.5

Array tools plugin for the Mumu ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extend("test")
extend("array")

describe("array:uniq", () => {
  it("unique ints", () => {
    expect_equal(array:uniq([1,2,2,3,1,4]), [1,2,3,4])
  })
  it("unique strings", () => {
    expect_equal(array:uniq(["a","b","a","a","c"]), ["a","b","c"])
  })
  it("unique floats", () => {
    expect_equal(array:uniq([1.0, 1.0, 2.5, 2.5, 3.0]), [1.0,2.5,3.0])
  })
})