codewillclick / obparity

simple node.js library for creating objects that exist in tandem between client (browser) and server
MIT License
0 stars 0 forks source link

Need a method that can overwrite or modify object being pushed from client to server on Proxy method call. #3

Closed codewillclick closed 3 years ago

codewillclick commented 3 years ago

Right now, said object has just enough information to reproduce the method call on the server side.

But if we're thinking of maybe having a many-to-one client-to-server relationship, being able to automatically pass in something like a client or session id might be ideal.

codewillclick commented 3 years ago

Made one. modMessage(), a method of the client-side ParityObject class. Assumes an object as its arg. Only expected use is within that f() function both proxy objects use within said client-side ProxyObject's constructor().

But yeah, you can modify properties on the fly with that thing. Kind of made it by necessity, and wasn't expecting to close this issue, but...

Closing!