Decompose conditional pattern on bob.js