Skip to content

made sure i called the addon in the js wrapper #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2019
Merged
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
4 changes: 3 additions & 1 deletion source/ports/node_port/package/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const addon =
const addon = require("./build/Release/addon.node")
module.exports = {
metacall () {
if(arguments.length == 0) throw Error("No Argument Passed!");

var functionName = typeof arguments[0] == "string" ? arguments[0] : null
if(functionName == null) throw Error("Function Name should be of string type");
addon.metacall(functionName);

},

Expand All @@ -14,6 +15,7 @@ module.exports = {
if(tag == null && array == null){
throw Error("Invalid Arguments, The valid arguments should be a tag string and an Array of strings(filenames)");
}
addon.metacall_load_from_file(filename, arrayOfFileNames);
// check how to know when node is in debug mode....
// make call to Node Addon....
}
Expand Down