{"library":"querymen","title":"Querymen","description":"Querymen is a querystring parsing middleware for Express.js and MongoDB, enabling automatic pagination, sorting, field selection, and custom query filters from URL parameters. Version 2.1.4 is the current stable release, with infrequent updates. It provides a declarative schema to map query parameters to MongoDB query operators like `$gte`, `$in`, and `$exists`, and integrates with mongoose-keywords for full-text search. Compared to alternatives like express-api-query-parser, it offers a more opinionated and schema-driven approach with built-in pagination defaults.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install querymen"],"cli":null},"imports":["import { middleware as query } from 'querymen'","import { Schema } from 'querymen'","const { querymen } = req;"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import express from 'express';\nimport { middleware as query } from 'querymen';\n\nconst app = express();\n\napp.get('/posts', query(), (req, res) => {\n  const { query, select, cursor } = req.querymen;\n  // Example: fetch posts with pagination and sorting from query string\n  // User requests: /posts?page=2&limit=10&sort=-createdAt\n  Post.find(query, select, cursor, (err, posts) => {\n    res.json(posts);\n  });\n});\n\napp.listen(3000);","lang":"typescript","description":"Demonstrates basic usage of Querymen middleware with Express, handling pagination and sorting from query string parameters.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}