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
extend("test")
extend("array")

describe("array:prop_partial", () => {
  it("retrieves a key via partial then object", () => {
    getName = array:prop_partial("name")
    expect_equal(getName([name:"A", city:"B"]), "A")
  })
  it("placeholder for key with object known", () => {
    p = array:prop_partial(_, [x:10, y:20])
    expect_equal(p("y"), 20)
  })
})