iotjs
iotjs copied to clipboard
Revise ugly looking module wrapper
Currently, to make module a function we wrapping over js source with wrapper looking somewhat ugly.
const char* wrapper[2] = {
"(function (a, b, c) { function wwwwrap(exports,require, module) {",
" }; wwwwrap(a, b, c); });" };
This double wrapping is because single wrapping results in bug with losing captured variables. This is probably bug on eval functionality of jerry.
All test not requring 'buffer' module seems run without problem.
Closing as resolved.