lib/escort.js
function (object) {
        ACCEPTABLE_METHODS.forEach(function (method) {
            /**
             * Bind the provided route with a specific method to the callback provided.
             * Since you cannot specify a route more than once, it is required to use bind to provide multiple methods.
             *
             * @param {String} routeName The name of the route. Should be a JavaScript identifier. Optional.
             * @param {String} route The URL for the route.
             * @param {Function} callback The callback to be called when the route is accessed.
             *
             * @throws Error the routeName is already specified
             * @throws Error the route is already specified
             * @throws Error the route does not start with "/"
             * @throws Error an unknown route converter was specified
             *
             * @api public
             * 
             * @example routes.get("/", function(request, response) {
             *     response.end("GET /");
             * });
             * @example routes.post("item", "/{name}", function(request, response, params) {
             *     response.end("GET /" + params.name);
             * });
             */
            object[method] = function (routeName, route, callback) {
                if (arguments.length === 2) {
                    callback = route;
                    route = routeName;
                    routeName = null;
                }
                var descriptor = {};
                descriptor[method] = callback;
                if (arguments.length === 2) {
                    return this.bind(route, descriptor);
                } else {
                    return this.bind(routeName, route, descriptor);
                }
            };
        });
        object.del = object.delete;
    }
function (object) {
        ACCEPTABLE_METHODS.forEach(function (method) {
            /**
             * Bind the provided route with a specific method to the callback provided.
             * Since you cannot specify a route more than once, it is required to use bind to provide multiple methods.
             *
             * @param {String} routeName The name of the route. Should be a JavaScript identifier. Optional.
             * @param {String} route The URL for the route.
             * @param {Function} callback The callback to be called when the route is accessed.
             *
             * @throws Error the routeName is already specified
             * @throws Error the route is already specified
             * @throws Error the route does not start with "/"
             * @throws Error an unknown route converter was specified
             *
             * @api public
             * 
             * @example routes.get("/", function(request, response) {
             *     response.end("GET /");
             * });
             * @example routes.post("item", "/{name}", function(request, response, params) {
             *     response.end("GET /" + params.name);
             * });
             */
            object[method] = function (routeName, route, callback) {
                if (arguments.length === 2) {
                    callback = route;
                    route = routeName;
                    routeName = null;
                }
                var descriptor = {};
                descriptor[method] = callback;
                if (arguments.length === 2) {
                    return this.bind(route, descriptor);
                } else {
                    return this.bind(routeName, route, descriptor);
                }
            };
        });
        object.del = object.delete;
    }
function ( object ) { ACCEPTABLE_METHODS . forEach ( function ( method ) { /**
             * Bind the provided route with a specific method to the callback provided.
             * Since you cannot specify a route more than once, it is required to use bind to provide multiple methods.
             *
             * @param {String} routeName The name of the route. Should be a JavaScript identifier. Optional.
             * @param {String} route The URL for the route.
             * @param {Function} callback The callback to be called when the route is accessed.
             *
             * @throws Error the routeName is already specified
             * @throws Error the route is already specified
             * @throws Error the route does not start with "/"
             * @throws Error an unknown route converter was specified
             *
             * @api public
             * 
             * @example routes.get("/", function(request, response) {
             *     response.end("GET /");
             * });
             * @example routes.post("item", "/{name}", function(request, response, params) {
             *     response.end("GET /" + params.name);
             * });
             */ object [ method ] = function ( routeName , route , callback ) { if ( arguments . length === 2 ) { callback = route ; route = routeName ; routeName = null ; } var descriptor = { } ; descriptor [ method ] = callback ; if ( arguments . length === 2 ) { return this . bind ( route , descriptor ) ; } else { return this . bind ( routeName , route , descriptor ) ; } } ; } ) ; object . del = object . delete ; }
Attach all the helper HTTP and WebDAV methods as helper functions which will
ultimately call bind on the provided object.

@param {Object} object the Object to attach the methods to.
@api private
Attach all the helper HTTP and WebDAV methods as helper functions which will ultimately call bind on the provided object .