Skip to content

Version 5.0.0

Choose a tag to compare

@bleupen bleupen released this 08 May 19:58

Added support for representation.configure()

For example:

handler: function(req, reply) {
    const result = {
          name: 'John Doe',
          bossId: 10001,
          toHal: function(rep, done) {
             rep.configure({
                 // provide a conf object similar to what you would use in a route definition
                 links: {
                      boss: r => r.route('boss.lookup', { id: this.bossId })
                 },
                 embedded: {}
             }, done);
          }
    };
}

I rolled the major version because this is a non-trivial refactoring, however I have not encountered any test regressions or problems in my own applications.