From 20aa68cc40f41edd1bbb8b10e67ab8ee6d6b7ddd Mon Sep 17 00:00:00 2001 From: souparno majumder Date: Fri, 26 Feb 2016 03:10:32 +0530 Subject: [PATCH] removing unnecessary function parameters --- packages/jsio.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/jsio.js b/packages/jsio.js index 93774b7..36a7b90 100644 --- a/packages/jsio.js +++ b/packages/jsio.js @@ -780,13 +780,13 @@ } } - function resolveImportRequest(context, request, opts) { + function resolveImportRequest(request) { var cmds = jsio.__cmds, imports = [], result = false; for (var i = 0, imp; imp = cmds[i]; ++i) { - if ((result = imp(context, request, opts, imports))) { break; } + if ((result = imp(request, imports))) { break; } } if (result !== true) { @@ -838,7 +838,7 @@ var exportInto = opts.exportInto || boundContext || ENV.global; // parse the import request(s) - var imports = resolveImportRequest(exportInto, request, opts), + var imports = resolveImportRequest(request), numImports = imports.length, retVal = numImports > 1 ? {} : null; @@ -955,7 +955,7 @@ // from myPackage import myFunc // external myPackage import myFunc - jsio.addCmd(function(context, request, opts, imports) { + jsio.addCmd(function(request, imports) { var match = request.match(/^\s*(from|external)\s+([\w.\-$]+)\s+(import|grab)\s+(.*)$/); if(match) { imports.push({ @@ -973,7 +973,7 @@ }); // import myPackage - jsio.addCmd(function(context, request, opts, imports) { + jsio.addCmd(function(request, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.\-$]+)(?:\s+as\s+([\w.\-$]+))?,?/g, function(_, fullPath, as) { @@ -991,7 +991,7 @@ }); // CommonJS syntax - jsio.addCmd(function(context, request, opts, imports) { + jsio.addCmd(function(request, imports) { // ./../b -> ..b // ../../b -> ...b