diff --git a/lib/worker.js b/lib/worker.js
index c8e5d688570740be47e4aa97bd3dc0605b8c9298..a704f231df95f1cdddb2b80277482830bda7ccc0 100644
--- a/lib/worker.js
+++ b/lib/worker.js
@@ -6,19 +6,11 @@ var fs = require("fs"),
     noop = require(path.join(__dirname, "noop.js")),
     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) {
-	var args = trim(arg.replace(/^.*\(/, "").replace(/[\t|\r|\n|\"|\']+/g, "").replace(/\).*/, "")),
-	    body = trim(arg.replace(/^.*\{/, "").replace(/\}$/, ""));
+	var __worker_evaluated_function_ = null;
+	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
diff --git a/src/worker.js b/src/worker.js
index 907f620083cd733719d58655b24f3347523ca0aa..32db2aa3d8c046b7fd14f6b6fb852d18b7b3440e 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -4,19 +4,11 @@ const fs = require("fs"),
 	noop = require(path.join(__dirname, "noop.js")),
 	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) {
-	const args = trim(arg.replace(/^.*\(/, "").replace(/[\t|\r|\n|\"|\']+/g, "").replace(/\).*/, "")),
-		body = trim(arg.replace(/^.*\{/, "").replace(/\}$/, ""));
+	var __worker_evaluated_function_ = null;
+	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