glennjones/hapi-swagger — pull request #4 by davidwaterston (2013-12-22 01:39:14+00:00)
Title: Tighten up route selection

Recent change has ensured previously hidden routes are now visible but
now matches too broadly e.g. indexOf looking for ‘/movies’ would also
match ‘/moviescenes’ when it shouldn’t.

Using ‘search’ with a regular expression ensures we get only the routes
we want.

A jsFiddle illustrates the difference: http://jsfiddle.net/davidwaterston/cC4v8/