News for hackers. Stuff that matters.
Re:Creating Read-Only References to Objects in JavaScript by effbott on Saturday December 21, 2013 @02:48PM (#6947723)
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"}

There are no comments on this comment yet.