code: function plugin (opts) {
    var seneca = this
  
    seneca.decorate('stamp', (pattern) => {
      Assert((pattern === 'role:echo'))
      console.log(Date.now().toString(), pattern)
    })
  
    return {
      name: 'timestamper'
    }
  }
docs: Plugins are great way to add decorations to seneca. Below we have a simple plugin that adds the .stamp() method to our instance. This will allow us to log objects with a timestamp. Simple stuff.