Function
object 5952 else if ("undefined" != typeof self) t = self;
5953 else
5954 try {
5955 t = Function("return this")(); 5956 } catch (e) {
5957 throw new Error(
5958 "polyfill failed because global object is unavailable in this environment",
Function
object 5740 }
5741 function f() {
5742 try {
5743 var t = Function("return this")().require("vertx"); 5744 return (U = t.runOnLoop || t.runOnContext), i();
5745 } catch (e) {
5746 return c();
Function
object 6065 else if ("undefined" != typeof self) t = self;
6066 else
6067 try {
6068 t = Function("return this")(); 6069 } catch (e) {
6070 throw new Error(
6071 "polyfill failed because global object is unavailable in this environment",
Function
object 5853 }
5854 function f() {
5855 try {
5856 var t = Function("return this")().require("vertx"); 5857 return (U = t.runOnLoop || t.runOnContext), i();
5858 } catch (e) {
5859 return c();
Function
object 5950 else if ("undefined" != typeof self) t = self;
5951 else
5952 try {
5953 t = Function("return this")(); 5954 } catch (e) {
5955 throw new Error(
5956 "polyfill failed because global object is unavailable in this environment",
Creating functions using the Function
constructor can be avoided when all arguments are strings.
JS runtimes find it easier to optimize functions that are written in plain JavaScript syntax.
Consider using arrow functions, or the function
keyword instead.
const add = new Function('a', 'b', 'return a + b')
const sub = Function('a', 'b', 'return a - b')
const add = function (a, b) { return a + b }
const sub = function (a, b) { return a - b }