mfinelli / koa-uncapitalize

koajs middleware to uncapitalize routes

Home Page:https://www.npmjs.com/package/koa-uncapitalize

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Koa Uncapitalize

NPM Build Status

A koajs middleware to uncapitalize routes based on a similar module that was created for express: express-uncapitalize.

Installation

Install the package using npm:

$ npm install --save koa-uncapitalize

Usage

Usage is easy: just require the module and app.use it:

const uncapitalize = require("koa-uncapitalize");
app.use(uncapitalize);

Or all at once:

app.use(require("koa-uncapitalize"));

Now all users accessing uppercase routes will be redirected (301) to the lowercase equivalent: http://example.com/TEST -> http://example.com/test.

License

Licensed under the MIT license. For more information please see the LICENSE file that should have been included with the project.

About

koajs middleware to uncapitalize routes

https://www.npmjs.com/package/koa-uncapitalize

License:MIT License


Languages

Language:JavaScript 100.0%