Pre plugin for specifying accept-version in url

In several projects I have manually created a pre function that uses the first the first part of the path to specify the accept version.  I.e. /v1/some/path maps accept-version: ~1 to /some/path.  This plugin implements the concept.