JavaScript Design Patterns: Decorator