Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
pass options to static-module
  • Loading branch information
archmoj committed Jun 15, 2020
commit 433f983cd7e5b423ce9028b0af720a6054247117
7 changes: 6 additions & 1 deletion lib/cwise-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ function processFunc(func) {
}

function cwiseTransform(file, opts) {
if(!opts) opts = {}
if(opts.allowAccessToMethodsOnFunctions !== false) {
opts.allowAccessToMethodsOnFunctions = true
}

var sm = staticModule({
cwise: function(user_args) {
for(var id in user_args) {
Expand All @@ -42,6 +47,6 @@ function cwiseTransform(file, opts) {
var codeStr = "require('cwise/lib/wrapper')(" + JSON.stringify(compileBlock) + ")"
return codeStr
}
})
}, opts)
return sm
}