// Fake service (makes a tether)
/* jshint node: true */

(function () {
    "use strict";

    var runtime = require("quark_node_runtime.js");
    var directory = require("./directory");

    var identity = process.argv[2];
    var name = "service-" + identity;
    var address = "JS-endpoint-" + identity;

    var d = new directory.Directory(runtime, "ws://127.0.0.1:8910", name, address);

    function ShowAnswer(service) {
        this.service = service;
    }
    ShowAnswer.prototype.run = function(entry) {
        if (entry) {
            console.log("Looked up " + this.service + " and got back " +
                        entry.service + " -> " + entry.endpoints.toString());
        } else {
            console.log("Looked up " + this.service + " and got back " + entry);
        }
    };

    ["A", "B", "C", "D", "E"].forEach(function (letter) {
        var service = "service-" + letter;
        d.lookupAsync(service, new ShowAnswer(service));
    });
    console.log("lookupAsync called");

    runtime.launch();
    // And now we wait...
})();

@@ -513,201 +513,8 @@
 ) %7B%0A
-        if (entry) %7B%0A            console.log(%22Looked up %22 + this.service + %22 and got back %22 +%0A                        entry.service + %22 -%3E %22 + entry.endpoints.toString());%0A        %7D else %7B%0A    
     
@@ -590,18 +590,8 @@
 y);%0A
-        %7D%0A
     

Use new Entry.toString() method