
Research
/Security News
Bitwarden CLI Compromised in Ongoing Checkmarx Supply Chain Campaign
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.
api-query-parser
Advanced tools
parse = require('api-query-parser')
parse.dateRange("2014-01-01-2014-06-01")
{
from: Wed Jan 01 2014 01:00:00 GMT+0100 (CET),
to: Sun Jun 01 2014 02:00:00 GMT+0200 (CEST)
}
parse.sort('-created,title')
{
created: 'desc',
title: 'asc'
}
parse.csv('allowed,created,title,notallowed', {allowed: ['allowed', 'created', 'title']})
[ 'allowed', 'created', 'title' ]
Always returns a boolean. Default value is false
// returns true for true, 'true', 1, '1', 'yes' parse.integer('1')
true
parse.integer('0')
false
Always returns a number. Default value is 0
// always returns a number
parse.integer('foo')
0
// Use a default value
parse.integer('foo', {default: 10})
10
// Use a maxium value
parse.integer(1000, {default: 10, max: 100})
100
Always returns a number. Default value is 0
// parse.positiveInteger(number as string or int, default, max value)
parse.positiveInteger(req.query.limit, {default: 10, max: 100})
100
Always returns a date. Undefined if parsing failed.
parse.date("2014-01-01")
Wed Jan 01 2014 01:00:00 GMT+0100 (CET)
Always returns an Object.
parse.dateRange("2014-01-01-2014-06-01")
{
from: Wed Jan 01 2014 01:00:00 GMT+0100 (CET),
to: Sun Jun 01 2014 02:00:00 GMT+0200 (CEST)
}
Always returns an Object. Default limit is 50
parse.pagination({page: '10'})
{
offset: 450,
limit: 50
}
// Override the offset
parse.pagination({offset: 450})
{
offset: 450,
limit: 50
}
// Set the limit
parse.pagination({page: 5, limit: 10})
{ offset: 40, limit: 10 }
parse.middlewares.all(config)
-> returns function(req, res, next) {
// which populates req.options
req.options = req.options || {}
// And pagination, sort & fields on req.options
req.options.pagination = {
offset: 0
limit: 50
}
req.options.sort = {
title: 'asc'
}
req.options.fields = ['title', 'name']
}
FAQs
Helper module to parse api queries
We found that api-query-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.

Research
/Security News
Docker and Socket have uncovered malicious Checkmarx KICS images and suspicious code extension releases in a broader supply chain compromise.

Product
Stay on top of alert changes with filtered subscriptions, batched summaries, and notification routing built for triage.