onDoc: function(items) { // "Greedily" expand the stack, so it's a normal data dictionary var perDocData = {}; nutil.complete(perDocData, items[1]); nutil.complete(perDocData, items[0]); nutil.complete(perDocData, {'url': 'TODO'}); // For non-hidden source files, update the data for indices var len = this.indexStack.length; this.indexStack[len-1]['docs'].push(perDocData); for (var i = 0; i < len; i++) { this.indexStack[i]['all-docs'].push(perDocData); } },
exports["test does not complete key"] = function() { assert.eq("usa", util.complete({ hello: "usa" }, { hello: "world" }).hello); };
PackageDescriptor.prototype.setUid = function(uid) { // insert 'uid' at the top of the package descriptor this.spec = UTIL.complete({ "uid": uid }, this.spec); this.save(); }
exports["test completes key"] = function() { assert.eq("world", util.complete({}, { hello: "world" }).hello); };