Re:Proxy, a new JavaScript ES6 feature
by CapacitorSet on Friday May 18, 2018 @04:34AM
(#17099666)
I agree it doesn't seem super useful, but it can be used to pull some semantic tricks. I used it in [Rebridge](https://github.com/CapacitorSet/rebridge/) to implement syntactic sugar for database access, so that accessing a property on an object translates transparently to a query, and I've seen it used to [allow for typos in property names](https://github.com/mathiasbynens/tpyo).
[ Parent
| on HN ]
Re:Proxy, a new JavaScript ES6 feature
by yashthakur on Friday May 18, 2018 @06:43AM
(#17100339)
I especially liked the "construct" part as we can use it to take input from the users in frontend as a numbered value and then store it in the database with the currency format which can be later used to make the value visible with the currency in the frontend.