Templates for JavaScript Design Patterns