lib/lookup.js
function(collection, pattern, options) {
      var views = this.getViews(collection);
      if (views.hasOwnProperty(pattern)) {
        return views[pattern];
      }
      return utils.matchKey(views, pattern, options);
    }
function(collection, pattern, options) {
      var views = this.getViews(collection);
      if (views.hasOwnProperty(pattern)) {
        return views[pattern];
      }
      return utils.matchKey(views, pattern, options);
    }
function ( collection , pattern , options ) { var views = this . getViews ( collection ) ; if ( views . hasOwnProperty ( pattern ) ) { return views [ pattern ] ; } return utils . matchKey ( views , pattern , options ) ; }
Returns the first template from the given collection with a key
that matches the given glob pattern.

```js
var pages = app.matchView('pages', 'home.*');
//=> {'home.hbs': { ... }, ...}

var posts = app.matchView('posts', '2010-*');
//=> {'2015-10-10.md': { ... }, ...}
```

@param {String} `collection` Collection name.
@param {String} `pattern` glob pattern
@param {Object} `options` options to pass to [micromatch]
@return {Object}
@api public
Returns the first template from the given collection with a key that matches the given glob pattern .