Alex Vincent: Introducing es7-membrane: A new ECMAScript 2016 Membrane implementation |
I have a new ECMAScript membrane implementation, which I will maintain and use in a professional capacity, and which I’m looking for lots of help with in the form of code reviews and API design advice.
For those of you who don’t remember what a membrane is, Tom van Cutsem wrote about membranes a few years ago, including the first implementations in JavaScript. I recently answered a StackOverflow question on why a membrane might be useful in the first place.
Right now, the membrane supports “perfect” mirroring across object graphs: as far as I can tell, separate object graphs within the same membrane never see objects or functions from another object graph.
The word “perfect” is in quotes because there are probably bugs, facets I haven’t yet tested for (“What happens if I call Object.freeze() on a proxy from the membrane?”, for example). There is no support yet for the real uses of proxies, such as hiding properties, exposing new ones, or special handling of primitive values. That support is forthcoming, as I do expect I will need a membrane in my “Verbosio” project (an experimental XML editor concept, irrelevant to this group) and another for the company I work for.
The good news is the tests pass in Node 6.4, the current Google Chrome release, and Mozilla Firefox 51 (trunk, debug build). I have not tested any other browser or ECMAScript environment. I also will be checking in lots of use cases over the next few weeks which will guide future work on the module.
With all that said, I’d love to get some help. That’s why I moved it to its own GitHub repository.
If you’re not able to comment here for some reason, I’ve set up a GitHub wiki page for that purpose.
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |