Javascript library for writing, chaining and using conditional statements in a functional way