# Parcial
![Build Status](https://travis-ci.org/quarterto/Parcial.svg)](https://travis-ci.org/quarterto/Parcial)
Tagged partial methods, like:
var a = ; try a catche ab = { return "you're it" };a; //⇒ "you're it" ab = { return a * 2 };a; //⇒ 10 ab = { return "you got me" };a; //⇒ "you got me"
api
parcial(name, options = {strict: true})
Returns an object with a getter and setter for the method name
. If options.strict
is false, the method does not throw an exception if it encounters a tag it doesn't know about.
why
Parcial works great with mixins. No need to do a deep merge; just use partials:
var base = ; var a = method: { return 'a' };var b = method: { return 'b' };var c = method: { return 'c' }; var agg = ;aggmethod'a'; //⇒ 'a'aggmethod'b'; //⇒ 'b'aggmethod'c'; //⇒ 'c'
Licence
MIT. © 2014 Matt Brennan