Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ logs
results

npm-debug.log
package-lock.json
node_modules/*
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
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"cwise-parser": "^1.0.0",
"cwise-compiler": "^1.1.1",
"static-module": "^1.0.0",
"static-module": "git://github.com/browserify/static-module.git#3c18ee194fdb674ce590a65ace4e5e17c775733f",
"uglify-js": "^2.6.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test("fill", function(t) {
var fill = cwise({
args: ["index", "array", "scalar"],
body: function(idx, out, f) {
out = f.apply(undefined, idx)
out = f.apply(null, idx)
}
})

Expand Down