constructor(opts = {}) {
    if (!(this instanceof Router)) return new Router(opts); // eslint-disable-line no-constructor-return

    this.opts = opts;
    this.methods = this.opts.methods || [
      'HEAD',
      'OPTIONS',
      'GET',
      'PUT',
      'PATCH',
      'POST',
      'DELETE'
    ];
    this.exclusive = Boolean(this.opts.exclusive);

    this.params = {};
    this.stack = [];
    this.host = this.opts.host;
  }
Create a new router.

@example

Basic usage:

```javascript
const Koa = require('koa');
const Router = require('@koa/router');

const app = new Koa();
const router = new Router();

router.get('/', (ctx, next) => {
  // ctx.router available
});

app
  .use(router.routes())
  .use(router.allowedMethods());
```

@alias module:koa-router
@param {Object=} opts
@param {Boolean=false} opts.exclusive only run last matched route's controller when there are multiple matches
@param {String=} opts.prefix prefix router paths
@param {String|RegExp=} opts.host host for router match
@constructor