A template for conditional support to AMD to JavaScript libraries