Y
Hacker News
new
|
ask
|
show
|
jobs
by
effbott
4565 days ago
This doesn't make the target object read-only - it just returns a reference to it.
data = {one: "one"} ref = makeRef(data) ref().two = "two" data => Object {one: "one", two: "two"}