import { assertEquals } from "jsr:@std/assert"
const
data = { kill: { your: { self: [0, 1, { 0: 0, 1: { noice: "YAHAHA", 0: "you found me!" } }] } } },
[getData, setData] = bindDotPathTo(data)
assertEquals(getData("kill.your.self.2.1"), {0: "you found me!", noice: "YAHAHA"})
setData("kill.your.self.2.1.noice", ["arr", "ree", "eek"])
assertEquals(getData("kill.your.self.2.1"), {0: "you found me!", noice: ["arr", "ree", "eek"]})
generate a
dot-path
getter and setter for a specific object given bybind_to
.