Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-legit

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-legit

Koa middleware to validate and sanitize HTTP request

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source
Koa Legit

Koa Legit

:traffic_light: Koa middleware to validate and sanitize HTTP request


Koa Legit is a Koa middleware to easily validate HTTP request data including headers, cookies, body, query strings, and url params. It's based on validator.

  • It was written for us on OMNIOUS which provides fashion A.I API service.

Installation

# NPM
$ npm install --save koa-legit
# Yarn
$ yarn add koa-legit

Example

const Koa = require('koa');
const bodyParser = require('koa-bodyparser');
const legit = require('koa-legit');
const Router = require('koa-router');


const app = new Koa();

// Set middlewares
app.use(bodyParser({ enableTypes: ['json', 'form'] }));
app.use(legit());


// Bootstrap application router
const router = new Roter();
app.use(router.routes());
app.use(router.allowedMethods());

app.listen(3000);

API

To be updated

Contributing

This project follows the Contributor Covenant Code of Conduct.

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or ask feature requests.

Self Promotion

Like koa-legit? Follow the repository on GitHub. And if you're feeling especially charitable, follow posquit0 on GitHub.

Contact

If you have any questions, feel free to join me at #posquit0 on Freenode and ask away. Click here to connect.

License

Provided under the terms of the MIT License.

Copyright © 2017, Byungjin Park.

Keywords

FAQs

Package last updated on 12 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc