src/basis/template.js
function switcher(events, rule){
    if (!rule)
    {
      rule = events;
      events = null;
    }

    if (typeof events == 'string')
      events = events.split(/\s+/);

    return new TemplateSwitchConfig({
      rule: rule,
      events: events
    });
  }
function switcher(events, rule){
    if (!rule)
    {
      rule = events;
      events = null;
    }

    if (typeof events == 'string')
      events = events.split(/\s+/);

    return new TemplateSwitchConfig({
      rule: rule,
      events: events
    });
  }
function switcher ( events , rule ) { if ( ! rule ) { rule = events ; events = null ; } if ( typeof events == 'string' ) events = events . split ( / \s+ / ) ; return new TemplateSwitchConfig ( { rule : rule , events : events } ) ; }
Helper to create TemplateSwitchConfig instance
@param {string|string[]} events
@param {function()} rule
Helper to create TemplateSwitchConfig instance