## How it works en-route is a different, but similar concept to routes you might be familiar with, like express routes. The general idea is, you can: 1. Use middleware to modify file objects 1. Define routes, to determine whether or not a middleware function should run on a given file. 1. Define [handlers](#handlers) for running specific middleware at specific points in your application or build. See the [examples folder](./examples) for a number of different examples of how en-route works. ## Usage ```js const Router = require('en-route'); const router = new Router(); ``` ## API {%= apidocs("lib/router.js") %} {%= apidocs("lib/route.js") %} {%= apidocs("lib/layer.js") %} ## Release history ### v2.0.0 **Breaking changes** - en-route was completely refactored from the ground-up. ### v1.0.0 **Breaking changes** - en-route no longer supports error middleware (middleware with three arguments). This was done to simplify debugging, eliminate code debt that makes en-route harder to maintain and improve, to make en-route and middleware run faster, and to make certain that errors are always passed to the final done function.