Skip to content

Instantly share code, notes, and snippets.

@vkz
Created April 23, 2015 10:28
Show Gist options
  • Select an option

  • Save vkz/bd012cb5846ac710f6a3 to your computer and use it in GitHub Desktop.

Select an option

Save vkz/bd012cb5846ac710f6a3 to your computer and use it in GitHub Desktop.
apply with mode
block b1, content: applyNext(this.bla = 'bla', 'default', this.ctx.b = 'b')
block('b1').content()(function () {
return applyNext({
'bla': 'bla',
'_mode': 'default',
'ctx.b': 'b'
});
});
var cache;
match(function () {
return !this.elem;
}, function () {
return this.block === 'b1';
}, function () {
return this['__$anflg2'] !== true;
}, function () {
return this._mode === 'content';
})(function () {
return local({ '__$anflg2': true })(function () {
return local({
'bla': 'bla',
'_mode': 'default',
'ctx.b': 'b'
})(function () {
return apply();
});
});
});
{block: 'b1'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment