jstests/libs/parallelTester.js
// NOTE: This is a naive implementation that cannot handle cyclic objects.

This is a naive implementation that cannot handle cyclic objects.
This is a naive implementation that cannot handle cyclic objects .
function evalCodeArgs(arg) {
            if (arg instanceof Code) {
                return eval("(" + arg.code + ")");
            } else if (arg !== null && isObject(arg)) {
                var newArg = arg instanceof Array ? [] : {};
                for (var prop in arg) {
                    if (arg.hasOwnProperty(prop)) {
                        newArg[prop] = evalCodeArgs(arg[prop]);
                    }
                }
                return newArg;
            }
            return arg;
        }
function evalCodeArgs ( arg ) { if ( arg instanceof Code ) { return eval ( "(" + arg . code + ")" ) ; } else if ( arg !== null && isObject ( arg ) ) { var newArg = arg instanceof Array ? [ ] : { } ; for ( var prop in arg ) { if ( arg . hasOwnProperty ( prop ) ) { newArg [ prop ] = evalCodeArgs ( arg [ prop ] ) ; } } return newArg ; } return arg ; }
NOTE: This is a naive implementation that cannot handle cyclic objects.
NOTE : This is a naive implementation that cannot handle cyclic objects .