Skip to content
Snippets Groups Projects
Commit 0cf0a529 authored by Daniele Di Sarli's avatar Daniele Di Sarli
Browse files

Add built file

parent 2ad36782
No related branches found
No related tags found
No related merge requests found
...@@ -6,19 +6,11 @@ var fs = require("fs"), ...@@ -6,19 +6,11 @@ var fs = require("fs"),
noop = require(path.join(__dirname, "noop.js")), noop = require(path.join(__dirname, "noop.js")),
events = /^(error|message)$/; events = /^(error|message)$/;
function trim(arg) {
return arg.replace(/^(\s+|\t+|\n+)|(\s+|\t+|\n+)$/g, "");
}
function explode(arg) {
return trim(arg).split(new RegExp("\\s*,\\s*"));
}
function toFunction(arg) { function toFunction(arg) {
var args = trim(arg.replace(/^.*\(/, "").replace(/[\t|\r|\n|\"|\']+/g, "").replace(/\).*/, "")), var __worker_evaluated_function_ = null;
body = trim(arg.replace(/^.*\{/, "").replace(/\}$/, "")); eval("__worker_evaluated_function_ = (" + arg + ")"); // eslint-disable-line no-eval
return Function.apply(Function, explode(args).concat([body])); return __worker_evaluated_function_;
} }
// Bootstraps the Worker // Bootstraps the Worker
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment