コード例 #1
0
ファイル: doc.js プロジェクト: smith/jesyll
  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);
    }
  },
コード例 #2
0
exports["test does not complete key"] = function() {
    assert.eq("usa", util.complete({
        hello: "usa"
    }, {
        hello: "world"
    }).hello);
};
コード例 #3
0
PackageDescriptor.prototype.setUid = function(uid) {
    // insert 'uid' at the top of the package descriptor
    this.spec = UTIL.complete({
        "uid": uid
    }, this.spec);
    this.save();
}
コード例 #4
0
exports["test completes key"] = function() {
    assert.eq("world", util.complete({}, { hello: "world" }).hello);
};