HNHacker News
TopNewBestAskShowJobs

jfet97

57 karma · joined June 10, 2018

submissionscomments
jfet97··on Cloning JavaScript objects with graph theory
Thanks for sharing!
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
Lot of stuff, as you can see in the docs. JSON.parse/stringify does not call the constructors for example
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
I've really appreciated your comment :D
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
Yes but with persistent data structures each operation implies a cost, more or less big. For example most of times you do something with an persistent array you end up with fully cloning it. What's the point? I know the advantages of immutability, but I think that perform impure operations into pure functions, in a safe contest, is not so bad. My function can help with this...we could perform those faster impure operations (modifiyng local objects and arrays) and then create full, deeply cloned entities to pass around.
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
hoping that my funtion can help you :)
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
thanks :)
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
No I've built it on my own. I only know that popular libraries as lodash don't call constructors, so I think there is no way to mantain a proper [[Prototype]] nor the constructor props. IDK how other libraries do to handle circ references nor if them allow to copy non-enums props and getters&setters.
jfet97··on Show HN: An isomorphic, configurable JavaScript utility for object deep cloning
Yes, an isomorphic js program is a program that can run both in browsers and nodejs. I know that is not mathematically correct, but lot of devs use this word and understand its meaning.