plow-js
plow-js copied to clipboard
Dates are transformed to ISO strings
There's a line const object = JSON.parse(JSON.stringify(subject)); in src/migrations/atoms/set/index.js, it results in Date objects being transformed into ISO strings (e.g. '2016-07-11T18:31:28.608Z').
Why is this line needed?
Correct me if i'm wrong, but it looks like they are attempting to make object a deep copy of subject, otherwise it would just be a reference to subject.
Look like it, but deep copying can be done a little more clever than simple stringify-parse, I think