Closed juliangruber closed 1 year ago
I expect .toJSON() to return a copy, so I can mess with data without changing the real model.
.toJSON()
We might use a more efficient cloning algorithm, I'm not sure where this method is used.
I think attrs is usually shallow, so we probably can go faster than using JSON serializing :)
attrs
prior discussion was here: https://github.com/component/model/pull/39/files but i think im still +1 having a clone
I expect
.toJSON()
to return a copy, so I can mess with data without changing the real model.We might use a more efficient cloning algorithm, I'm not sure where this method is used.