Skip to content

Diff plain arrays in computes

Choose a tag to compare

@justinbmeyer justinbmeyer released this 08 Jun 22:41
· 894 commits to master since this release

From #216

Allows a compute with an array to use diffing similar to the following example:

var which = compute(false);
var a = {}, b = {}, c = {};

var list = compute(function(){
  return which() ? [a,c]: [a,b,c]
});

stache("{{#each list}}...");