spumko/hapi — pull request #1354 by MathieuLoutre (2014-01-26 16:08:41+00:00)
Title: Use configuration objects to register helpers

Here's a proposal:
Looking at `server.helper`, it seems like it could easily accept an object like this:

```js
{
name: 'parseData'
method: function (data, next) {
next(JSON.parse(data))
},
options: {
expiresIn: 10000
}
}
```

This would allow to register an array of helper config, just like adding an array of route config.

I've updated the tests and the docs. The logic of adding the helpers is very close to the ones used to add routes.

Main problems:
- Breaking change
- The configuration validation doesn't seem very hapi-esque