Remember that XSJS should be a lightweight pass-through layer. May times you just are creating a service endpoint where the bulk of the logic is in turn implemented within the database itself. This should be the primary design pattern overall. Following this pattern should leave you with relatively little JavaScript code itself which often falls nicely into simply small functions.
We did teach a Code Review session last year at TechEd on some more advanced JavaScript techniques. We use some of those patterns in our own larger XSJS libraries. However really I would encourage customers/partners to first look at putting most of their logic in the database itself and then trying leverage that logic via libraries like XSDS.