koas-parameters
Advanced tools
Koas parameters attempts to coerce path and query parameters to the type specified in their respective JSON schema.
Weekly downloads
Readme
Koas parameters attempts to coerce path and query parameters to the type specified in their respective JSON schema.
npm install koa koas-core koas-parameters
const Koa = require('koa');
const { koas } = require('koas-core');
const { parameters } = require('koas-parameters');
const api = require('./api.json');
const app = new Koa();
app.use(
koas(api, [
parameters({
parsers: {
// Additional parsers
},
}),
]),
);
parsers
: A mapping of JSON schema types to parsers. This allows to override how certain values
are parsed. In most cases, the defaults will suffice.FAQs
Koas parameters attempts to coerce path and query parameters to the type specified in their respective JSON schema.
The npm package koas-parameters receives a total of 681 weekly downloads. As such, koas-parameters popularity was classified as not popular.
We found that koas-parameters demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.