https://github.com/herp-inc/koa-path-canonicalizer
A Koa middleware to redirect to canonicalized path
https://github.com/herp-inc/koa-path-canonicalizer
javascript koa koa-middleware koajs typescript
Last synced: about 2 months ago
JSON representation
A Koa middleware to redirect to canonicalized path
- Host: GitHub
- URL: https://github.com/herp-inc/koa-path-canonicalizer
- Owner: herp-inc
- Created: 2018-10-10T18:18:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T20:19:11.000Z (4 months ago)
- Last Synced: 2025-03-22T14:02:29.118Z (3 months ago)
- Topics: javascript, koa, koa-middleware, koajs, typescript
- Language: TypeScript
- Homepage:
- Size: 592 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# koa-path-canonicalizer
[](https://www.npmjs.com/package/koa-path-canonicalizer)
[](https://circleci.com/gh/herp-inc/koa-path-canonicalizer)A Koa middleware to redirect to canonicalized path
## Installation
```console
$ yarn add koa-path-canonicalizer
```## Usage
```javascript
const Koa = require('koa');
const { pathCanonicalizer } = require('koa-path-canonicalizer');const app = new Koa();
app.use(pathCanonicalizer());
```## License
The MIT License (MIT)