Skip to content

olsonpm/koa-decoded-querystring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koa Decoded Querystring

To use

const koaDecodedQuerystring = require('koa-decoded-querystring');
// ...
app.use(koaDecodedQuerystring());

Very Simple

This module is 5 lines long

// call function to allow for future options as advised by koa best-practices
module.exports = () =>
  (ctx, next) => {
    ctx.decodedQuerystring = decodeURIComponent(ctx.querystring);
    return next();
  };

So when ctx.querystring contains "%20", decodedQuerystring will contain a space instead

I only created this module to isolate the testing and any further additions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published