Skip to content

Commit

Permalink
Add depth benchmark cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Feb 7, 2014
1 parent 8f07bba commit 6ca06d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bench/templates/depth-1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
context: { names: [{name: "Moe"}, {name: "Larry"}, {name: "Curly"}, {name: "Shemp"}], foo: 'bar' },
handlebars: "{{#each names}}{{../foo}}{{/each}}",
mustache: "{{#names}}{{foo}}{{/names}}",
eco: "<% for item in @names: %><%= @foo %><% end %>"
};
6 changes: 6 additions & 0 deletions bench/templates/depth-2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
context: { names: [{bat: 'foo', name: ["Moe"]}, {bat: 'foo', name: ["Larry"]}, {bat: 'foo', name: ["Curly"]}, {bat: 'foo', name: ["Shemp"]}], foo: 'bar' },
handlebars: "{{#each names}}{{#each name}}{{../bat}}{{../../foo}}{{/each}}{{/each}}",
mustache: "{{#names}}{{#name}}{{bat}}{{foo}}{{/name}}{{/names}}",
eco: "<% for item in @names: %><% for child in item.name: %><%= item.bat %><%= @foo %><% end %><% end %>"
};

0 comments on commit 6ca06d4

Please sign in to comment.