Chainable logic built on named (or not) queues in Javascript