index.js
function writeActivity(template, activity) {
  if (!enabled) {
    return;
  }

  var handlers = outputHandlers.get();

  if (handlers.length === 0) {
    throw new Error('No output handlers defined.');
  }

  handlers.forEach(function(handler) {
    handler(template(activity));
  });
}
function writeActivity(template, activity) {
  if (!enabled) {
    return;
  }

  var handlers = outputHandlers.get();

  if (handlers.length === 0) {
    throw new Error('No output handlers defined.');
  }

  handlers.forEach(function(handler) {
    handler(template(activity));
  });
}
function writeActivity ( template , activity ) { if ( ! enabled ) { return ; } var handlers = outputHandlers . get ( ) ; if ( handlers . length === 0 ) { throw new Error ( 'No output handlers defined.' ) ; } handlers . forEach ( function ( handler ) { handler ( template ( activity ) ) ; } ) ; }
Outputs the activity message to all defined handlers.
@param {Function} template Template to use to format the message.
@param {Activity} activity Activity object.
Outputs the activity message to all defined handlers .