New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastify-qs

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-qs

Fastify plugin for querystring parsing with qs

5.0.0
latest
Source
npm
Version published
Weekly downloads
4.5K
16.68%
Maintainers
0
Weekly downloads
 
Created
Source

fastify-qs

Build Status GitHub issues GitHub license npm

A plugin for Fastify that adds support for parsing URL query parameters with qs.

Plugin accepts any options from qs.parse method

This plugin removes all unnecessary ? from the beginning of the query string.

This behavior can be disabled with disablePrefixTrim option.

Install

npm i fastify-qs

Plugin specific options

  • disabled: set true if you want to disable qs parsing
  • disablePrefixTrim: set true if you want to disable

Example

const fastify = require('fastify')()

fastify.register(require('fastify-qs'), {})

fastify.get('/*', (req, reply) => {
  req.query // -> { a: ['1', '2'] }
  reply.send('')
})

// GET: 'http://127.0.0.1/?a[]=1&a[]=2

License

MIT © Vano Devium

Keywords

fastify

FAQs

Package last updated on 10 Oct 2024

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