<commit_before># hapi-to [![Build Status](https://travis-ci.org/mtharrison/hapi-to.svg)](https://travis-ci.org/mtharrison/hapi-to)

This plugin gives you an API for generating URLs dynamically in hapi using route ids and optional parameters, so you don't need to hardcode them into your views. This helps a bunch if you change the path structure of your routes, or move them into prefixed plugins in the future.

##Features

• Let's you change paths without breaking existing links + redirects
• 100% test coverage
• Works with params (including wildcard and multi-params)
• Configurable with options

##Install

To download and add to dependencies run `npm install --save hapi-to`

Register with a server like any other hapi plugin with `server.register()`:

```javascript
var Hapi = require('hapi');

var server= new Hapi.Server();
server.connection({ port: 8080 });

server.register(require('hapi-to'), function (err) {
    
    if (err) {
        throw err;
    }<commit_msg>Updated docs<commit_after># hapi-to [![Build Status](https://travis-ci.org/mtharrison/hapi-to.svg)](https://travis-ci.org/mtharrison/hapi-to)

This plugin gives you an API for generating URLs dynamically in hapi using route ids and optional parameters, so you don't need to hardcode them into your views. This helps a bunch if you change the path structure of your routes, or move them into prefixed plugins in the future.

##Features

 - Let's you change paths without breaking existing links + redirects
 - 100% test coverage
 - Works with params (including wildcard and multi-params)
 - Configurable with options

##Install

To download and add to dependencies run `npm install --save hapi-to`

Register with a server like any other hapi plugin with `server.register()`:

```javascript
var Hapi = require('hapi');

var server= new Hapi.Server();
server.connection({ port: 8080 });

server.register(require('hapi-to'), function (err) {
    
    if (err) {
        throw err;
    }
{'fraction_non_alphanumeric': 0.09994900560938297, 'fraction_numerical': 0.0071392146863844975, 'mean_word_length': 4.190476190476191, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6658401', 'n_tokens_mistral': 581, 'n_tokens_neox': 549, 'n_words': 241}